@@ -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 Railt\Compiler\Grammar\Reader\Analyzer; |
| 11 | 11 | |
@@ -257,26 +257,26 @@ discard block |
||
| 257 | 257 | case T::T_N_TO_M: |
| 258 | 258 | $handle = \trim($this->lookahead->current()->value(), '{}'); |
| 259 | 259 | $nm = \explode(',', $handle); |
| 260 | - $min = (int)\trim($nm[0]); |
|
| 261 | - $max = (int)\trim($nm[1]); |
|
| 260 | + $min = (int) \trim($nm[0]); |
|
| 261 | + $max = (int) \trim($nm[1]); |
|
| 262 | 262 | $this->lookahead->next(); |
| 263 | 263 | break; |
| 264 | 264 | |
| 265 | 265 | case T::T_ZERO_TO_M: |
| 266 | 266 | $min = 0; |
| 267 | - $max = (int)\trim($this->lookahead->current()->value(), '{,}'); |
|
| 267 | + $max = (int) \trim($this->lookahead->current()->value(), '{,}'); |
|
| 268 | 268 | $this->lookahead->next(); |
| 269 | 269 | break; |
| 270 | 270 | |
| 271 | 271 | case T::T_N_OR_MORE: |
| 272 | - $min = (int)\trim($this->lookahead->current()->value(), '{,}'); |
|
| 272 | + $min = (int) \trim($this->lookahead->current()->value(), '{,}'); |
|
| 273 | 273 | $max = -1; |
| 274 | 274 | $this->lookahead->next(); |
| 275 | 275 | break; |
| 276 | 276 | |
| 277 | 277 | case T::T_EXACTLY_N: |
| 278 | 278 | $handle = \trim($this->lookahead->current()->value(), '{}'); |
| 279 | - $min = (int)$handle; |
|
| 279 | + $min = (int) $handle; |
|
| 280 | 280 | $max = $min; |
| 281 | 281 | $this->lookahead->next(); |
| 282 | 282 | break; |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | $name = $this->transitionalRuleCounter++; |
| 302 | 302 | |
| 303 | - $this->parsedRules[$name] = new RepetitionBuilder($name, $min, $max, (array)$children); |
|
| 303 | + $this->parsedRules[$name] = new RepetitionBuilder($name, $min, $max, (array) $children); |
|
| 304 | 304 | |
| 305 | 305 | return $name; |
| 306 | 306 | } |
@@ -339,8 +339,8 @@ discard block |
||
| 339 | 339 | { |
| 340 | 340 | $tokenName = \rtrim($this->lookahead->current()->value(), '()'); |
| 341 | 341 | |
| 342 | - $isEmptyRule = ! \array_key_exists($tokenName, $this->rules) && |
|
| 343 | - ! \array_key_exists('#' . $tokenName, $this->rules); |
|
| 342 | + $isEmptyRule = !\array_key_exists($tokenName, $this->rules) && |
|
| 343 | + !\array_key_exists('#'.$tokenName, $this->rules); |
|
| 344 | 344 | |
| 345 | 345 | if ($isEmptyRule) { |
| 346 | 346 | $error = \vsprintf('Cannot call rule %s() in rule %s because it does not exist.', [ |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | ) { |
| 358 | 358 | $name = $this->transitionalRuleCounter++; |
| 359 | 359 | |
| 360 | - $this->parsedRules[$name] = new ConcatenationBuilder($name, (array)$tokenName); |
|
| 360 | + $this->parsedRules[$name] = new ConcatenationBuilder($name, (array) $tokenName); |
|
| 361 | 361 | } else { |
| 362 | 362 | $name = $tokenName; |
| 363 | 363 | } |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | { |
| 377 | 377 | $tokenName = \trim($this->lookahead->current()->value(), $kept ? '<>' : ':'); |
| 378 | 378 | |
| 379 | - if (! $this->getLexer()->has($tokenName)) { |
|
| 379 | + if (!$this->getLexer()->has($tokenName)) { |
|
| 380 | 380 | $error = \sprintf('Token %s does not exist in rule %s.', $tokenName, $this->ruleName); |
| 381 | 381 | throw new GrammarException($error, 4); |
| 382 | 382 | } |
@@ -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 Railt\Compiler\Grammar\Reader; |
| 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 Railt\Compiler\Grammar\Lexer; |
| 11 | 11 | |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | * For the full copyright and license information, please view the |
| 6 | 6 | * LICENSE 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 Railt\Compiler\Grammar\Lexer; |
| 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 Railt\Compiler\Grammar; |
| 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 Railt\Compiler\Parser\Rule; |
| 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 Railt\Compiler\Parser\Rule; |
| 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 Railt\Compiler\Parser\Rule; |
| 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 Railt\Compiler\Parser\Rule; |
| 11 | 11 | |