Differential D25030 Diff 82 src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
Context not available. | |||||
$heredocs = $root->selectDescendantsOfType('n_HEREDOC'); | $heredocs = $root->selectDescendantsOfType('n_HEREDOC'); | ||||
foreach ($heredocs as $heredoc) { | foreach ($heredocs as $heredoc) { | ||||
if (preg_match('/^<<<[\'"]/', $heredoc->getConcreteString())) { | if (@preg_match('/^<<<[\'"]/', $heredoc->getConcreteString())) { | ||||
$this->raiseLintAtNode( | $this->raiseLintAtNode( | ||||
$heredoc, | $heredoc, | ||||
pht( | pht( | ||||
Context not available. | |||||
continue; | continue; | ||||
} | } | ||||
if (strtolower($class->getConcreteString()) != 'self') { | if (@strtolower($class->getConcreteString()) != 'self') { | ||||
continue; | continue; | ||||
} | } | ||||
Context not available. | |||||
$numeric_scalars = $root->selectDescendantsOfType('n_NUMERIC_SCALAR'); | $numeric_scalars = $root->selectDescendantsOfType('n_NUMERIC_SCALAR'); | ||||
foreach ($numeric_scalars as $numeric_scalar) { | foreach ($numeric_scalars as $numeric_scalar) { | ||||
if (preg_match('/^0b[01]+$/i', $numeric_scalar->getConcreteString())) { | if (@preg_match('/^0b[01]+$/i', $numeric_scalar->getConcreteString())) { | ||||
$this->raiseLintAtNode( | $this->raiseLintAtNode( | ||||
$numeric_scalar, | $numeric_scalar, | ||||
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