Page MenuHomePhabricator

Minor fix for typecast linter rule
ClosedPublic

Authored by joshuaspence on Nov 30 2015, 7:40 PM.
Tags
None
Referenced Files
F14100333: D14611.id35369.diff
Tue, Nov 26, 1:55 PM
Unknown Object (File)
Sun, Nov 24, 9:27 PM
Unknown Object (File)
Sun, Nov 24, 1:38 AM
Unknown Object (File)
Sat, Nov 23, 12:59 AM
Unknown Object (File)
Sat, Nov 23, 12:38 AM
Unknown Object (File)
Fri, Nov 22, 7:34 PM
Unknown Object (File)
Fri, Nov 22, 3:41 PM
Unknown Object (File)
Mon, Nov 18, 8:29 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.