Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php
Context not available. | |||||
* statically; `null` if static evaluation was not possible. | * statically; `null` if static evaluation was not possible. | ||||
*/ | */ | ||||
protected function evaluateStaticBoolean($string) { | protected function evaluateStaticBoolean($string) { | ||||
switch (strtolower($string)) { | switch (@strtolower($string)) { | ||||
case '0': | case '0': | ||||
case 'null': | case 'null': | ||||
case 'false': | case 'false': | ||||
Context not available. | |||||
foreach ($calls as $call) { | foreach ($calls as $call) { | ||||
$node = $call->getChildByIndex(0); | $node = $call->getChildByIndex(0); | ||||
$name = strtolower($node->getConcreteString()); | $name = @strtolower($node->getConcreteString()); | ||||
if (in_array($name, $function_names)) { | if (in_array($name, $function_names)) { | ||||
$nodes[] = $call; | $nodes[] = $call; | ||||
Context not available. | |||||
$modifiers = array(); | $modifiers = array(); | ||||
foreach ($modifier_list->selectDescendantsOfType('n_STRING') as $modifier) { | foreach ($modifier_list->selectDescendantsOfType('n_STRING') as $modifier) { | ||||
$modifiers[strtolower($modifier->getConcreteString())] = true; | $modifiers[@strtolower($modifier->getConcreteString())] = true; | ||||
} | } | ||||
return $modifiers; | return $modifiers; | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0