@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * @param CompressResult $result |
| 76 | - * @param $resultFile |
|
| 76 | + * @param resource $resultFile |
|
| 77 | 77 | * @param null $headerFile |
| 78 | 78 | * |
| 79 | 79 | * @throws LogicException |
@@ -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\CodeGen; |
| 11 | 11 | |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | protected function skipif(string $spec): bool |
| 282 | 282 | { |
| 283 | 283 | dump($spec); |
| 284 | - [ $dump, $test ] = \explode(' ', $spec, 2); |
|
| 284 | + [$dump, $test] = \explode(' ', $spec, 2); |
|
| 285 | 285 | $test = \trim($test); |
| 286 | 286 | switch ($test) { |
| 287 | 287 | case '-a': |
@@ -219,7 +219,7 @@ |
||
| 219 | 219 | * Context constructor. |
| 220 | 220 | * |
| 221 | 221 | * @param string $filename |
| 222 | - * @param resource|null $debugFile |
|
| 222 | + * @param null|resource $debugFile |
|
| 223 | 223 | */ |
| 224 | 224 | public function __construct(string $filename = 'YY', resource $debugFile = null) |
| 225 | 225 | { |
@@ -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\Grammar; |
| 11 | 11 | |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $nil->code = $code++; |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | - \usort($this->_symbols, function ($a, $b) { |
|
| 289 | + \usort($this->_symbols, function($a, $b) { |
|
| 290 | 290 | return $a->code <=> $b->code; |
| 291 | 291 | }); |
| 292 | 292 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * @param int $terminal |
| 80 | 80 | * @param int $precedence |
| 81 | 81 | * @param int $associativity |
| 82 | - * @param Symbol|null $type |
|
| 82 | + * @param null|\self $type |
|
| 83 | 83 | * |
| 84 | 84 | * @throws LogicException |
| 85 | 85 | */ |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
| 177 | - * @param Symbol|null $type |
|
| 177 | + * @param null|\self $type |
|
| 178 | 178 | */ |
| 179 | 179 | public function setType(self $type = null) |
| 180 | 180 | { |
@@ -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\Grammar; |
| 11 | 11 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * Conflict constructor. |
| 31 | 31 | * |
| 32 | 32 | * @param Symbol $symbol |
| 33 | - * @param Conflict|null $next |
|
| 33 | + * @param null|\self $next |
|
| 34 | 34 | */ |
| 35 | 35 | protected function __construct(Symbol $symbol, self $next = null) |
| 36 | 36 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | - * @param Conflict|null $next |
|
| 74 | + * @param null|\self $next |
|
| 75 | 75 | */ |
| 76 | 76 | public function setNext(self $next = null) |
| 77 | 77 | { |
@@ -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 | |
@@ -134,10 +134,8 @@ |
||
| 134 | 134 | |
| 135 | 135 | /** |
| 136 | 136 | * @param Context $ctx |
| 137 | - * @param Token $t |
|
| 138 | 137 | * @param int $nth |
| 139 | 138 | * @param int $len |
| 140 | - * @param string|null $type |
|
| 141 | 139 | * |
| 142 | 140 | * @return array |
| 143 | 141 | */ |
@@ -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 | |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | /** |
| 97 | 97 | * @param array $symbols |
| 98 | 98 | * @param int $n |
| 99 | - * @param $delm |
|
| 99 | + * @param string $delm |
|
| 100 | 100 | * @param array $attribute |
| 101 | 101 | * |
| 102 | 102 | * @throws ParseException |
@@ -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 | |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | continue; |
| 273 | 273 | } |
| 274 | 274 | if (($j = $symbol->value) === null) { |
| 275 | - throw new ParseException("Nonterminal {$symbol->name} used but not defined"); |
|
| 275 | + throw new ParseException("nonterminal {$symbol->name} used but not defined"); |
|
| 276 | 276 | } |
| 277 | 277 | $k = null; |
| 278 | 278 | while ($j) { |
@@ -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; |
| 11 | 11 | |