Summary: Also allow `sTaTiC::$x` which is a valid PHP (contrary to `sElF::$x` which is invalid PHP but I allowed that too).
Test Plan:
new self;
Reviewers: epriestley
Reviewed By: epriestley
CC: wez, aran, Korvin
Differential Revision: https://secure.phabricator.com/D5241
}
}
+$magic_names = array(
+ 'static' => true,
+ 'parent' => true,
+ 'self' => true,
+);
+
// This is "new X()".
$uses_of_new = $root->selectDescendantsOfType('n_NEW');
foreach ($uses_of_new as $new_operator) {
$name->getTypeName() == 'n_VARIABLE_VARIABLE') {
continue;
}
+ $name_concrete = strtolower($name->getConcreteString());
+ if (isset($magic_names[$name_concrete])) {
+ continue;
+ }
$need[] = array(
'type' => 'class',
'symbol' => $name,
if ($name->getTypeName() != 'n_CLASS_NAME') {
continue;
}
- $name_concrete = $name->getConcreteString();
- $magic_names = array(
- 'static' => true,
- 'parent' => true,
- 'self' => true,
- );
+ $name_concrete = strtolower($name->getConcreteString());
if (isset($magic_names[$name_concrete])) {
continue;
}