Skip to content

Commit

Permalink
Merge branch 'php-8.0/squiz-incrementdecrementusage-support-nullsafe-…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Sep 2, 2020
2 parents 5ddc6fe + 616eb38 commit 222ea42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ protected function processIncDec($phpcsFile, $stackPtr)
// start looking for other operators.
if ($tokens[($stackPtr - 1)]['code'] === T_VARIABLE
|| ($tokens[($stackPtr - 1)]['code'] === T_STRING
&& $tokens[($stackPtr - 2)]['code'] === T_OBJECT_OPERATOR)
&& ($tokens[($stackPtr - 2)]['code'] === T_OBJECT_OPERATOR
|| $tokens[($stackPtr - 2)]['code'] === T_NULLSAFE_OBJECT_OPERATOR))
) {
$start = ($stackPtr + 1);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ $var = (1 + $var);
$expected[$i]['sort_order'] = ($i + 1);
$expected[($i + 1)]['sort_order'] = ($i + 1);

$id = $id.($this->i++).$id;
$id = $id.($obj->i++).$id;
$id = $obj?->i++.$id;
$id = $obj?->i++*10;
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public function getErrorList()
27 => 1,
29 => 1,
31 => 1,
41 => 1,
42 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit 222ea42

Please sign in to comment.