Differential D25030 Diff 82 src/lint/linter/xhpast/rules/ArcanistInvalidOctalNumericScalarXHPASTLinterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistInvalidOctalNumericScalarXHPASTLinterRule.php
Context not available. | |||||
$octals = $this->getOctalNumericScalars($root); | $octals = $this->getOctalNumericScalars($root); | ||||
foreach ($octals as $octal) { | foreach ($octals as $octal) { | ||||
if (!preg_match('/^0[0-7]*$/', $octal->getConcreteString())) { | if (!@preg_match('/^0[0-7]*$/', $octal->getConcreteString())) { | ||||
$this->raiseLintAtNode( | $this->raiseLintAtNode( | ||||
$octal, | $octal, | ||||
pht( | pht( | ||||
Context not available. | |||||
foreach ($numeric_scalars as $numeric_scalar) { | foreach ($numeric_scalars as $numeric_scalar) { | ||||
$number = $numeric_scalar->getConcreteString(); | $number = $numeric_scalar->getConcreteString(); | ||||
if (preg_match('/^0\d+$/', $number)) { | if (@preg_match('/^0\d+$/', $number)) { | ||||
$octal_numeric_scalars[] = $numeric_scalar; | $octal_numeric_scalars[] = $numeric_scalar; | ||||
} | } | ||||
} | } | ||||
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