Page MenuHomePhabricator

Minor fix for typecast linter rule
ClosedPublic

Authored by joshuaspence on Nov 30 2015, 7:40 PM.
Tags
None
Referenced Files
F14033171: D14611.diff
Sat, Nov 9, 5:01 PM
F14029212: D14611.id35392.diff
Fri, Nov 8, 7:59 PM
F14029211: D14611.id35369.diff
Fri, Nov 8, 7:59 PM
F14029210: D14611.id35347.diff
Fri, Nov 8, 7:59 PM
F14029209: D14611.id.diff
Fri, Nov 8, 7:59 PM
F14029208: D14611.diff
Fri, Nov 8, 7:59 PM
F14021517: D14611.diff
Wed, Nov 6, 9:45 AM
F13983775: D14611.id.diff
Sun, Oct 20, 8:32 AM
Subscribers

Details

Summary

intval($x, $y) cannot be safely changed to (int)$x if $y != 10.

Test Plan

Added test cases.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Minor fix for typecast linter rule.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 30 2015, 7:41 PM
joshuaspence edited edge metadata.

Fix failing test

src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php
31

We have a whole bunch of issues generally with case-insensitive class and function names. One way that we could improve handling of this is to introduce a CaseInsensitiveArray class, which should be case-insensitive but case-preserving.

This revision was automatically updated to reflect the committed changes.