@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc; |
| 11 | 11 | |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Support; |
| 11 | 11 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $indexedArray[] = [$item, $i++]; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - \usort($indexedArray, function (array $a, array $b) use ($cmp) { |
|
| 111 | + \usort($indexedArray, function(array $a, array $b) use ($cmp) { |
|
| 112 | 112 | $result = $cmp($a[0], $b[0]); |
| 113 | 113 | if ($result !== 0) { |
| 114 | 114 | return $result; |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Exception; |
| 11 | 11 | |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Lalr; |
| 11 | 11 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $tmpList = $this->sortList($tmpList, function (Lr1 $x, Lr1 $y) { |
|
| 147 | + $tmpList = $this->sortList($tmpList, function(Lr1 $x, Lr1 $y) { |
|
| 148 | 148 | $gx = $x->item[-1]->code; |
| 149 | 149 | $gy = $y->item[-1]->code; |
| 150 | 150 | if ($gx !== $gy) { |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | if (!$tdefact) { |
| 321 | 321 | $tdefact = -1; |
| 322 | 322 | |
| 323 | - Utils::stableSort($tmpr, function (Reduce $x, Reduce $y) { |
|
| 323 | + Utils::stableSort($tmpr, function(Reduce $x, Reduce $y) { |
|
| 324 | 324 | if ($x->number != $y->number) { |
| 325 | 325 | return $y->number - $x->number; |
| 326 | 326 | } |
@@ -344,11 +344,11 @@ discard block |
||
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | // Squeeze tmpr |
| 347 | - $tmpr = array_filter($tmpr, function (Reduce $reduce) use ($tdefact) { |
|
| 347 | + $tmpr = array_filter($tmpr, function(Reduce $reduce) use ($tdefact) { |
|
| 348 | 348 | return $reduce->number !== $tdefact; |
| 349 | 349 | }); |
| 350 | 350 | |
| 351 | - Utils::stableSort($tmpr, function (Reduce $x, Reduce $y) { |
|
| 351 | + Utils::stableSort($tmpr, function(Reduce $x, Reduce $y) { |
|
| 352 | 352 | if ($x->symbol !== $y->symbol) { |
| 353 | 353 | return $x->symbol->code - $y->symbol->code; |
| 354 | 354 | } |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | // Sort states in decreasing order of entries |
| 387 | 387 | // do not move initial state |
| 388 | 388 | $initState = array_shift($this->states); |
| 389 | - Utils::stableSort($this->states, function (State $p, State $q) { |
|
| 389 | + Utils::stableSort($this->states, function(State $p, State $q) { |
|
| 390 | 390 | $numReduces = count($p->reduce) - 1; // -1 for default action |
| 391 | 391 | $pt = $numReduces; |
| 392 | 392 | $pn = count($p->shifts) + $numReduces; |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Lalr\Conflict; |
| 11 | 11 | |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Yacc; |
| 11 | 11 | |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Yacc; |
| 11 | 11 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $expanded = $this->macros->apply($this->context, $symbols, $tokens, $n, $attribute); |
| 127 | 127 | |
| 128 | - $action = \implode('', \array_map(function (Token $token) { |
|
| 128 | + $action = \implode('', \array_map(function(Token $token) { |
|
| 129 | 129 | return $token->getValue(); |
| 130 | 130 | }, $expanded)); |
| 131 | 131 | |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace PhpYacc\Yacc\Macro; |
| 11 | 11 | |