Differential D25030 Diff 82 src/lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php
Context not available. | |||||
$leading = $first->getNonsemanticTokensBefore(); | $leading = $first->getNonsemanticTokensBefore(); | ||||
$leading_text = implode('', mpull($leading, 'getValue')); | $leading_text = implode('', mpull($leading, 'getValue')); | ||||
if (preg_match('/^\s+$/', $leading_text)) { | if (@preg_match('/^\s+$/', $leading_text)) { | ||||
$this->raiseLintAtOffset( | $this->raiseLintAtOffset( | ||||
$first->getOffset() - strlen($leading_text), | $first->getOffset() - @strlen($leading_text), | ||||
pht('Convention: no spaces before opening parentheses.'), | pht('Convention: no spaces before opening parentheses.'), | ||||
$leading_text, | $leading_text, | ||||
''); | ''); | ||||
Context not available. | |||||
$trailing = $last->getNonsemanticTokensBefore(); | $trailing = $last->getNonsemanticTokensBefore(); | ||||
$trailing_text = implode('', mpull($trailing, 'getValue')); | $trailing_text = implode('', mpull($trailing, 'getValue')); | ||||
if (preg_match('/^\s+$/', $trailing_text)) { | if (@preg_match('/^\s+$/', $trailing_text)) { | ||||
$this->raiseLintAtOffset( | $this->raiseLintAtOffset( | ||||
$last->getOffset() - strlen($trailing_text), | $last->getOffset() - @strlen($trailing_text), | ||||
pht('Convention: no spaces before closing parentheses.'), | pht('Convention: no spaces before closing parentheses.'), | ||||
$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