Page MenuHomePhabricator

Minor fix for typecast linter rule
ClosedPublic

Authored by joshuaspence on Nov 30 2015, 7:40 PM.
Tags
None
Referenced Files
F14081389: D14611.diff
Fri, Nov 22, 7:34 PM
F14080657: D14611.diff
Fri, Nov 22, 3:41 PM
Unknown Object (File)
Mon, Nov 18, 8:29 AM
Unknown Object (File)
Thu, Nov 14, 1:47 AM
Unknown Object (File)
Sat, Nov 9, 5:01 PM
Unknown Object (File)
Fri, Nov 8, 7:59 PM
Unknown Object (File)
Fri, Nov 8, 7:59 PM
Unknown Object (File)
Fri, Nov 8, 7:59 PM
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.