]> khamidou — GitHub mirrors - arcanist.git/commit
Minor fix for typecast linter rule
authorJoshua Spence <josh@freelancer.com>
Wed, 2 Dec 2015 03:12:53 +0000 (14:12 +1100)
committerJoshua Spence <josh@freelancer.com>
Wed, 2 Dec 2015 03:12:53 +0000 (14:12 +1100)
commit09052d52470d12eb395fab0dbe4e0d1da56d8765
tree204ca9bcdf48a070655a2f331a7e3910a69ec7ff
parent00efcd294fd01b4b571bc3a3e8ecb7342fa57ef7
Minor fix for typecast linter rule

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

Test Plan: Added test cases.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14611
src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php
src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/base.lint-test [new file with mode: 0644]