Skip to content

Commit

Permalink
Merge branch 'php-8.0/squiz-operatorbracket-support-nullsafe-operator…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Sep 2, 2020
2 parents 62154b4 + 9d58172 commit 908b5ce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public function process(File $phpcsFile, $stackPtr)
T_SELF,
T_STATIC,
T_OBJECT_OPERATOR,
T_NULLSAFE_OBJECT_OPERATOR,
T_DOUBLE_COLON,
T_OPEN_SQUARE_BRACKET,
T_CLOSE_SQUARE_BRACKET,
Expand Down Expand Up @@ -283,6 +284,7 @@ public function addMissingBracketsError($phpcsFile, $stackPtr)
T_SELF => true,
T_STATIC => true,
T_OBJECT_OPERATOR => true,
T_NULLSAFE_OBJECT_OPERATOR => true,
T_DOUBLE_COLON => true,
T_MODULUS => true,
T_ISSET => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,5 @@ $value = (binary) $blah + b"binary $foo";

$test = (1 * static::TEST);
$test = myfunc(1 * static::TEST);

$errorPos = $params[$x]?->getLine() + $commentStart;
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,5 @@ $value = ((binary) $blah + b"binary $foo");

$test = (1 * static::TEST);
$test = myfunc(1 * static::TEST);

$errorPos = ($params[$x]?->getLine() + $commentStart);
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function getErrorList($testFile='OperatorBracketUnitTest.inc')
163 => 2,
165 => 2,
169 => 1,
174 => 1,
];
break;
case 'OperatorBracketUnitTest.js':
Expand Down

0 comments on commit 908b5ce

Please sign in to comment.