Differential D25030 Diff 82 src/lint/linter/xhpast/rules/ArcanistArrayIndexSpacingXHPASTLinterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistArrayIndexSpacingXHPASTLinterRule.php
Context not available. | |||||
$trailing = $last->getNonsemanticTokensAfter(); | $trailing = $last->getNonsemanticTokensAfter(); | ||||
$trailing_text = implode('', mpull($trailing, 'getValue')); | $trailing_text = implode('', mpull($trailing, 'getValue')); | ||||
if (preg_match('/^ +$/', $trailing_text)) { | if (@preg_match('/^ +$/', $trailing_text)) { | ||||
$this->raiseLintAtOffset( | $this->raiseLintAtOffset( | ||||
$last->getOffset() + strlen($last->getValue()), | $last->getOffset() + @strlen($last->getValue()), | ||||
pht('Convention: no spaces before index access.'), | pht('Convention: no spaces before index access.'), | ||||
$trailing_text, | $trailing_text, | ||||
''); | ''); | ||||
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