Skip to content

Commit 772f99e

Browse files
committed
Use short array deconstruction syntax.
1 parent b0b1ef4 commit 772f99e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lexer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function tokenize($expression)
6262
throw new SyntaxError(sprintf('Unexpected "%s".', $expression[$cursor]), $cursor, $expression);
6363
}
6464

65-
list($expect, $cur) = array_pop($brackets);
65+
[$expect, $cur] = array_pop($brackets);
6666
if ($expression[$cursor] != strtr($expect, '([{', ')]}')) {
6767
throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $cur, $expression);
6868
}
@@ -94,7 +94,7 @@ public function tokenize($expression)
9494
$tokens[] = new Token(Token::EOF_TYPE, null, $cursor + 1);
9595

9696
if (!empty($brackets)) {
97-
list($expect, $cur) = array_pop($brackets);
97+
[$expect, $cur] = array_pop($brackets);
9898
throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $cur, $expression);
9999
}
100100

0 commit comments

Comments
 (0)