Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistKeywordCasingXHPASTLinterRule.php
Context not available. | |||||
foreach ($class_static_accesses as $class_static_access) { | foreach ($class_static_accesses as $class_static_access) { | ||||
$class_ref = $class_static_access->getChildByIndex(0); | $class_ref = $class_static_access->getChildByIndex(0); | ||||
switch (strtolower($class_ref->getConcreteString())) { | switch (@strtolower($class_ref->getConcreteString())) { | ||||
case 'parent': | case 'parent': | ||||
case 'self': | case 'self': | ||||
$tokens = $class_ref->getTokens(); | $tokens = $class_ref->getTokens(); | ||||
Context not available. | |||||
foreach ($keywords as $keyword) { | foreach ($keywords as $keyword) { | ||||
$value = $keyword->getValue(); | $value = $keyword->getValue(); | ||||
if ($value != strtolower($value)) { | if ($value != @strtolower($value)) { | ||||
$this->raiseLintAtToken( | $this->raiseLintAtToken( | ||||
$keyword, | $keyword, | ||||
pht( | pht( | ||||
'Convention: spell keyword `%s` as `%s`.', | 'Convention: spell keyword `%s` as `%s`.', | ||||
$value, | $value, | ||||
strtolower($value)), | @strtolower($value)), | ||||
strtolower($value)); | @strtolower($value)); | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
continue; | continue; | ||||
} | } | ||||
if (idx($interesting_symbols, strtolower($symbol_name))) { | if (idx($interesting_symbols, @strtolower($symbol_name))) { | ||||
if ($symbol_name != strtolower($symbol_name)) { | if ($symbol_name != @strtolower($symbol_name)) { | ||||
$this->raiseLintAtNode( | $this->raiseLintAtNode( | ||||
$symbol, | $symbol, | ||||
pht( | pht( | ||||
'Convention: spell keyword `%s` as `%s`.', | 'Convention: spell keyword `%s` as `%s`.', | ||||
$symbol_name, | $symbol_name, | ||||
strtolower($symbol_name)), | @strtolower($symbol_name)), | ||||
strtolower($symbol_name)); | @strtolower($symbol_name)); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
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