Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistStaticThisXHPASTLinterRule.php
Context not available. | |||||
$method_is_abstract = false; | $method_is_abstract = false; | ||||
foreach ($attributes as $attribute) { | foreach ($attributes as $attribute) { | ||||
if (strtolower($attribute->getConcreteString()) === 'static') { | if (@strtolower($attribute->getConcreteString()) === 'static') { | ||||
$method_is_static = true; | $method_is_static = true; | ||||
} | } | ||||
if (strtolower($attribute->getConcreteString()) === 'abstract') { | if (@strtolower($attribute->getConcreteString()) === 'abstract') { | ||||
$method_is_abstract = true; | $method_is_abstract = true; | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
foreach ($variables as $variable) { | foreach ($variables as $variable) { | ||||
if ($method_is_static && | if ($method_is_static && | ||||
strtolower($variable->getConcreteString()) === '$this') { | @strtolower($variable->getConcreteString()) === '$this') { | ||||
$this->raiseLintAtNode( | $this->raiseLintAtNode( | ||||
$variable, | $variable, | ||||
pht( | pht( | ||||
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