@@ -12,7 +12,6 @@ discard block |
||
12 | 12 | use Railt\Io\Readable; |
13 | 13 | use Railt\Parser\Ast\RuleInterface; |
14 | 14 | use Railt\Parser\Environment; |
15 | -use Railt\Parser\Exception\UnexpectedTokenException; |
|
16 | 15 | use Railt\Parser\Exception\UnrecognizedTokenException; |
17 | 16 | use Railt\Reflection\Contracts\Definition; |
18 | 17 | use Railt\Reflection\Contracts\Dictionary; |
@@ -21,7 +20,6 @@ discard block |
||
21 | 20 | use Railt\Reflection\Dictionary\CallbackDictionary; |
22 | 21 | use Railt\Reflection\Document; |
23 | 22 | use Railt\Reflection\Reflection; |
24 | -use Railt\SDL\Compiler\Compilable; |
|
25 | 23 | use Railt\SDL\Compiler\Pipeline; |
26 | 24 | use Railt\SDL\Exception\CompilerException; |
27 | 25 | use Railt\SDL\Exception\SyntaxException; |
@@ -82,7 +82,7 @@ |
||
82 | 82 | */ |
83 | 83 | public function autoload(\Closure $then): void |
84 | 84 | { |
85 | - $this->dictionary->onTypeNotFound(function (string $type, ?Definition $from) use ($then): void { |
|
85 | + $this->dictionary->onTypeNotFound(function(string $type, ?Definition $from) use ($then) : void { |
|
86 | 86 | if (($file = $then($type, $from)) instanceof Readable) { |
87 | 87 | $this->compile($file); |
88 | 88 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function push(int $priority, callable $then): void |
76 | 76 | { |
77 | - if (! \array_key_exists($priority, $this->queue)) { |
|
77 | + if (!\array_key_exists($priority, $this->queue)) { |
|
78 | 78 | $this->queue[$priority] = $this->createList(); |
79 | 79 | } |
80 | 80 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function count(): int |
96 | 96 | { |
97 | - return (int)\array_reduce($this->queue, function (int $result, \SplQueue $queue): int { |
|
97 | + return (int) \array_reduce($this->queue, function(int $result, \SplQueue $queue): int { |
|
98 | 98 | return $result + $queue->count(); |
99 | 99 | }, 0); |
100 | 100 | } |
@@ -31,11 +31,11 @@ |
||
31 | 31 | { |
32 | 32 | parent::boot($env); |
33 | 33 | |
34 | - $this->transaction($this->definition, function () { |
|
34 | + $this->transaction($this->definition, function() { |
|
35 | 35 | $this->register(); |
36 | 36 | }); |
37 | 37 | |
38 | - $this->future(Pipeline::PRIORITY_DEFINITION, function () { |
|
38 | + $this->future(Pipeline::PRIORITY_DEFINITION, function() { |
|
39 | 39 | $this->addDescription($this->definition, $this); |
40 | 40 | }); |
41 | 41 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | private function bootValues(EnumDefinition $enum): void |
55 | 55 | { |
56 | 56 | foreach ($this->getEnumValues($enum) as $value) { |
57 | - $this->transaction($value, function (EnumValueDefinition $value) use ($enum): void { |
|
57 | + $this->transaction($value, function(EnumValueDefinition $value) use ($enum): void { |
|
58 | 58 | $this->verifyDuplication($enum, $value); |
59 | 59 | |
60 | 60 | $enum->withValue($value); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | foreach ($this->first('EnumValues', 1) as $ast) { |
73 | 73 | $enumValue = $this->createEnumValue($enum, $ast->first('T_NAME', 1)); |
74 | 74 | |
75 | - $this->transaction($enumValue, function (EnumValueDefinition $def) use ($ast): void { |
|
75 | + $this->transaction($enumValue, function(EnumValueDefinition $def) use ($ast): void { |
|
76 | 76 | //$this->withDescription($def, $ast); |
77 | 77 | |
78 | 78 | /** @var RuleInterface $defValue */ |
@@ -75,8 +75,8 @@ |
||
75 | 75 | */ |
76 | 76 | protected function future(int $priority, callable $then): void |
77 | 77 | { |
78 | - $this->pipeline->push($priority, function () use ($then) { |
|
79 | - $this->transaction($this->definition, function () use ($then) { |
|
78 | + $this->pipeline->push($priority, function() use ($then) { |
|
79 | + $this->transaction($this->definition, function() use ($then) { |
|
80 | 80 | $then(); |
81 | 81 | }); |
82 | 82 | }); |