@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function toPrimitive(): string |
23 | 23 | { |
24 | - return (string)$this->getChild(0)->getValue(); |
|
24 | + return (string) $this->getChild(0)->getValue(); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function toString(): string |
25 | 25 | { |
26 | - return (string)$this->toPrimitive(); |
|
26 | + return (string) $this->toPrimitive(); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return $this->parseInt($value->getValue()); |
60 | 60 | } |
61 | 61 | |
62 | - return (float)$value->getValue(); |
|
62 | + return (float) $value->getValue(); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | private function parseExponential(string $value): float |
115 | 115 | { |
116 | - return (float)$value; |
|
116 | + return (float) $value; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function parseFloat(string $value): float |
133 | 133 | { |
134 | - return (float)$value; |
|
134 | + return (float) $value; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | { |
33 | 33 | if ($definition instanceof ProvidesDirectives && $ast instanceof ProvidesDirectiveNodes) { |
34 | 34 | foreach ($ast->getDirectiveNodes() as $child) { |
35 | - $this->deferred(function () use ($definition, $child): void { |
|
35 | + $this->deferred(function() use ($definition, $child): void { |
|
36 | 36 | /** @var DirectiveInvocation $directive */ |
37 | 37 | $directive = $this->process->build($child, $definition); |
38 | 38 | |
39 | - $this->linker(function () use ($definition, $directive): void { |
|
39 | + $this->linker(function() use ($definition, $directive): void { |
|
40 | 40 | $this->validateDefinition($directive); |
41 | 41 | |
42 | 42 | $definition->withDirective($directive); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $definition = $directive->getDefinition(); |
56 | 56 | |
57 | - if (! $definition instanceof DirectiveDefinition) { |
|
57 | + if (!$definition instanceof DirectiveDefinition) { |
|
58 | 58 | $error = \sprintf('Can not use %s as directive', $definition); |
59 | 59 | throw (new TypeConflictException($error))->in($directive); |
60 | 60 | } |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | { |
30 | 30 | if ($document instanceof Document) { |
31 | 31 | foreach ($ast as $child) { |
32 | - $this->deferred(function () use ($document, $child): void { |
|
32 | + $this->deferred(function() use ($document, $child): void { |
|
33 | 33 | $definition = $this->process->build($child, $document); |
34 | 34 | |
35 | 35 | if ($definition instanceof TypeDefinition) { |
36 | - $this->deferred(function () use ($definition, $document): void { |
|
36 | + $this->deferred(function() use ($definition, $document): void { |
|
37 | 37 | if ($document->getDictionary()->has($definition->getName())) { |
38 | 38 | throw $this->redeclareException($definition); |
39 | 39 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | |
46 | 46 | if ($definition instanceof DirectiveInvocation) { |
47 | - $this->complete(function () use ($definition, $document): void { |
|
47 | + $this->complete(function() use ($definition, $document): void { |
|
48 | 48 | $document->withDirective($definition); |
49 | 49 | }); |
50 | 50 | } |
@@ -24,5 +24,5 @@ |
||
24 | 24 | * @param \Closure $exception |
25 | 25 | * @return DeferredInterface |
26 | 26 | */ |
27 | - public function catch(\Closure $exception): self; |
|
27 | + public function catch (\Closure $exception): self; |
|
28 | 28 | } |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | |
77 | 77 | $this->logger->debug(\sprintf('Add deferred execution (%s:%d)', $trace['file'], $trace['line'])); |
78 | 78 | |
79 | - $handler->then(function () use ($trace): void { |
|
79 | + $handler->then(function() use ($trace): void { |
|
80 | 80 | $this->logger->debug(\sprintf('Execute deferred handler (%s:%d)', $trace['file'], $trace['line'])); |
81 | 81 | }); |
82 | 82 | |
83 | - $handler->catch(function (\Throwable $e) use ($trace): void { |
|
83 | + $handler->catch(function(\Throwable $e) use ($trace): void { |
|
84 | 84 | $this->logger->debug(\sprintf('Deferred handler rejection (%s:%d)', $trace['file'], $trace['line'])); |
85 | 85 | $this->logger->error($e); |
86 | 86 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $this->log($handler); |
100 | 100 | } |
101 | 101 | |
102 | - if (! \array_key_exists($priority, $this->queue)) { |
|
102 | + if (!\array_key_exists($priority, $this->queue)) { |
|
103 | 103 | $this->queue[$priority] = $this->createCollection(); |
104 | 104 | } |
105 | 105 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function count(): int |
123 | 123 | { |
124 | - $accumulator = function (int $result, \SplQueue $queue): int { |
|
124 | + $accumulator = function(int $result, \SplQueue $queue): int { |
|
125 | 125 | return $result + $queue->count(); |
126 | 126 | }; |
127 | 127 | |
128 | - return (int)\array_reduce($this->queue, $accumulator, 0); |
|
128 | + return (int) \array_reduce($this->queue, $accumulator, 0); |
|
129 | 129 | } |
130 | 130 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | private function trim(string $content): string |
42 | 42 | { |
43 | - $lines = \array_map(function (string $line): string { |
|
43 | + $lines = \array_map(function(string $line): string { |
|
44 | 44 | return \ltrim($line, '#'); |
45 | 45 | }, \explode("\n", $content)); |
46 | 46 |