@@ -144,7 +144,7 @@ |
||
144 | 144 | |
145 | 145 | /** |
146 | 146 | * @param \Closure $filter |
147 | - * @return \Generator|DeferredInterface[] |
|
147 | + * @return \Generator |
|
148 | 148 | */ |
149 | 149 | public function export(\Closure $filter): \Generator |
150 | 150 | { |
@@ -9,9 +9,7 @@ |
||
9 | 9 | |
10 | 10 | namespace Railt\SDL\Frontend\Definition; |
11 | 11 | |
12 | -use Railt\Reflection\Contracts\Definition\TypeDefinition; |
|
13 | 12 | use Railt\SDL\Exception\NotFoundException; |
14 | -use Railt\SDL\Exception\TypeConflictException; |
|
15 | 13 | use Railt\SDL\Frontend\Context\ContextInterface; |
16 | 14 | use Railt\SDL\Frontend\Deferred\Deferred; |
17 | 15 | use Railt\SDL\Frontend\Deferred\DeferredInterface; |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | { |
54 | 54 | $this->naming = $naming; |
55 | 55 | |
56 | - $this->definitions = new Map(function (TypeNameInterface $name): string { |
|
56 | + $this->definitions = new Map(function(TypeNameInterface $name): string { |
|
57 | 57 | return $name->getFullyQualifiedName(); |
58 | 58 | }); |
59 | 59 | |
60 | - $this->resolvers = new Map(function (DefinitionInterface $definition): string { |
|
60 | + $this->resolvers = new Map(function(DefinitionInterface $definition): string { |
|
61 | 61 | return $definition->getName()->getFullyQualifiedName(); |
62 | 62 | }); |
63 | 63 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | private function toInvocationDeferredCallback(DefinitionInterface $original, DeferredInterface $then): \Closure |
178 | 178 | { |
179 | - return function (DefinitionInterface $definition = null, InvocationInterface $invocation = null) use ( |
|
179 | + return function(DefinitionInterface $definition = null, InvocationInterface $invocation = null) use ( |
|
180 | 180 | $original, |
181 | 181 | $then |
182 | 182 | ) { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | - * @return iterable|DeferredInterface[] |
|
68 | + * @return \Generator |
|
69 | 69 | */ |
70 | 70 | private function getDeferredResolvers(): iterable |
71 | 71 | { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function match($value): bool |
43 | 43 | { |
44 | - return (bool)($this->matcher)($value); |
|
44 | + return (bool) ($this->matcher)($value); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param TypeInterface|null $type |
129 | 129 | * @return VarSymbolInterface |
130 | 130 | */ |
131 | - public function declare(string $var, TypeInterface $type = null): VarSymbolInterface |
|
131 | + public function declare(string$var,TypeInterface$type=null): VarSymbolInterface |
|
132 | 132 | { |
133 | 133 | if ($this->has($var)) { |
134 | 134 | $error = 'Can not define var $%s, because %s already has been defined'; |
@@ -176,6 +176,6 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function __toString(): string |
178 | 178 | { |
179 | - return $this->getName()->getFullyQualifiedName() . ' (' . $this->getFile()->getPathname() .')'; |
|
179 | + return $this->getName()->getFullyQualifiedName().' ('.$this->getFile()->getPathname().')'; |
|
180 | 180 | } |
181 | 181 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $arguments = []; |
82 | 82 | |
83 | 83 | foreach ($this->arguments as $name => $value) { |
84 | - $arguments[] = $name . ': ' . $value; |
|
84 | + $arguments[] = $name.': '.$value; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | return \sprintf('%s<%s>', $this->name->getFullyQualifiedName(), \implode(', ', $arguments)); |
@@ -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 | /** |
@@ -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); |