@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | private function bootInterceptors(DeferredStorage $deferred, TypesStorage $types): Factory |
142 | 142 | { |
143 | - $wantsBuild = function (ContextInterface $ctx, RuleInterface $ast) { |
|
143 | + $wantsBuild = function(ContextInterface $ctx, RuleInterface $ast) { |
|
144 | 144 | return $this->buildNode($ctx, $ast); |
145 | 145 | }; |
146 | 146 | |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | */ |
279 | 279 | private function deferred(ContextInterface $context): ContextInterface |
280 | 280 | { |
281 | - $this->deferred->attach($this->types->export(function (DefinitionInterface $definition): bool { |
|
281 | + $this->deferred->attach($this->types->export(function(DefinitionInterface $definition): bool { |
|
282 | 282 | $invocation = new Invocation($definition->getName(), $definition->getContext()); |
283 | 283 | |
284 | - return ! $definition->isGeneric() && ! $this->types->resolved($invocation); |
|
284 | + return !$definition->isGeneric() && !$this->types->resolved($invocation); |
|
285 | 285 | })); |
286 | 286 | |
287 | 287 | [$context] = $this->process->run($context, $this->deferred->getIterator()); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $isConstant ? $record->lock() : $record->unlock(); |
54 | 54 | } |
55 | 55 | |
56 | - yield function () use ($rule, $variables) { |
|
56 | + yield function() use ($rule, $variables) { |
|
57 | 57 | /** @var ValueInterface $value */ |
58 | 58 | $value = yield $this->getValueNode($rule); |
59 | 59 |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | private function renderUtfSequences(string $body): string |
95 | 95 | { |
96 | - $callee = function (array $matches): string { |
|
96 | + $callee = function(array $matches): string { |
|
97 | 97 | [$char, $code] = [$matches[0], $matches[1]]; |
98 | 98 | |
99 | 99 | try { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | try { |
125 | 125 | if (\function_exists('\\json_decode')) { |
126 | - $result = @\json_decode('{"char": "' . $body . '"}')->char; |
|
126 | + $result = @\json_decode('{"char": "'.$body.'"}')->char; |
|
127 | 127 | |
128 | 128 | if (\json_last_error() === \JSON_ERROR_NONE) { |
129 | 129 | $body = $result; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function renderSpecialCharacters(string $body): string |
145 | 145 | { |
146 | - $callee = function (array $matches): string { |
|
146 | + $callee = function(array $matches): string { |
|
147 | 147 | [$char, $code] = [$matches[0], $matches[1]]; |
148 | 148 | |
149 | 149 | switch ($code) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | switch (true) { |
83 | 83 | case $isConst: |
84 | - return new Invocation(Name::fromString((string)$name->getValue()), $ctx); |
|
84 | + return new Invocation(Name::fromString((string) $name->getValue()), $ctx); |
|
85 | 85 | |
86 | 86 | case $isType: |
87 | 87 | /** @var Invocation $value */ |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $isConst = $name->getType()->typeOf(Type::const()); |
111 | 111 | |
112 | - if (! $isConst) { |
|
112 | + if (!$isConst) { |
|
113 | 113 | $error = 'Generic argument name must be a const but %s given'; |
114 | 114 | $exception = new TypeConflictException(\sprintf($error, $name)); |
115 | 115 | $exception->throwsIn($ctx->getFile(), $rule->getOffset()); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | throw $exception; |
118 | 118 | } |
119 | 119 | |
120 | - return Name::fromString((string)$name->getValue()); |
|
120 | + return Name::fromString((string) $name->getValue()); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | $isType = $value->getType()->typeOf(Type::type()); |
134 | 134 | |
135 | - if (! $isType) { |
|
135 | + if (!$isType) { |
|
136 | 136 | $error = 'Generic argument value must be a valid type, but %s given'; |
137 | 137 | $exception = new TypeConflictException(\sprintf($error, $value)); |
138 | 138 | $exception->throwsIn($ctx->getFile(), $rule->getOffset()); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return $this->parseInt($value->getValue()); |
53 | 53 | } |
54 | 54 | |
55 | - return (float)$value->getValue(); |
|
55 | + return (float) $value->getValue(); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function parseExponential(string $value): float |
81 | 81 | { |
82 | - return (float)$value; |
|
82 | + return (float) $value; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function parseFloat(string $value): float |
90 | 90 | { |
91 | - return (float)$value; |
|
91 | + return (float) $value; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -44,7 +44,7 @@ |
||
44 | 44 | /** @var DeferredInterface $definition */ |
45 | 45 | $definition = yield $rule->first('> #TypeDefinition'); |
46 | 46 | |
47 | - $definition->then(function (DefinitionInterface $definition, InvocationInterface $from) { |
|
47 | + $definition->then(function(DefinitionInterface $definition, InvocationInterface $from) { |
|
48 | 48 | /** @var ContextInterface $local */ |
49 | 49 | $local = yield $definition->getLocalContext(); // Open local context |
50 | 50 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function __construct() |
23 | 23 | { |
24 | - parent::__construct(function (TypeNameInterface $name, iterable $arguments) { |
|
24 | + parent::__construct(function(TypeNameInterface $name, iterable $arguments) { |
|
25 | 25 | return $this->format($name, $arguments); |
26 | 26 | }); |
27 | 27 | } |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | */ |
34 | 34 | private function format(TypeNameInterface $name, iterable $arguments): string |
35 | 35 | { |
36 | - echo \str_repeat('-', 100) . "\n"; |
|
37 | - echo $name . " "; |
|
36 | + echo \str_repeat('-', 100)."\n"; |
|
37 | + echo $name." "; |
|
38 | 38 | \dump($arguments); |
39 | 39 | |
40 | 40 | return $this->formatName($name); |