]> khamidou — GitHub mirrors - arcanist.git/commit
Fix PHP version check for function calls with static/variable functions
authorepriestley <git@epriestley.com>
Wed, 10 Sep 2014 21:01:34 +0000 (14:01 -0700)
committerepriestley <git@epriestley.com>
Wed, 10 Sep 2014 21:01:34 +0000 (14:01 -0700)
commite043d22afd26c4836e49428f4a33036143313ca3
tree03ae42ee414ae8109a56568f7a16da36ccec8de2
parent3f79ae258f342ce479604dbd5c663a922673a4ee
Fix PHP version check for function calls with static/variable functions

Summary: D10132 improved this check by eliminating some false postives, but assumes an `n_FUNCTION_CALL` always starts with `n_SYMBOL_NAME`. This is true for `f()`, but not true for `C::m()` or `$v()`.

Test Plan: Added and ran unit tests.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10467
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/conditional-usage.lint-test