Completed
Push — master ( b2a65d...63a169 )
by Kirill
02:18
created
src/Frontend/Builder.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@
 block discarded – undo
243 243
 
244 244
     /**
245 245
      * @param Readable $readable
246
-     * @param iterable|RuleInterface[] $rules
246
+     * @param RuleInterface $rules
247 247
      * @return iterable|array[]
248 248
      * @throws \Railt\Io\Exception\ExternalFileException
249 249
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 use Railt\Io\Readable;
13 13
 use Railt\Parser\Ast\RuleInterface;
14
-use Railt\Parser\Exception\UnexpectedTokenException;
15 14
 use Railt\Parser\Exception\UnrecognizedTokenException;
16 15
 use Railt\SDL\Exception\InternalException;
17 16
 use Railt\SDL\Exception\SyntaxException;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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());
Please login to merge, or discard this patch.
src/Frontend/Builder/Definition/ObjectDefinitionBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     /**
38 38
      * @param ContextInterface $ctx
39 39
      * @param RuleInterface $rule
40
-     * @return mixed|\Generator|void
40
+     * @return \Generator
41 41
      */
42 42
     public function reduce(ContextInterface $ctx, RuleInterface $rule)
43 43
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Frontend/Builder/Instruction/VariableBuilder.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * @param ContextInterface $ctx
42 42
      * @param RuleInterface $rule
43
-     * @return \Generator|\Closure
43
+     * @return \Generator
44 44
      */
45 45
     public function reduce(ContextInterface $ctx, RuleInterface $rule): \Generator
46 46
     {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     /**
68 68
      * @param RuleInterface $rule
69
-     * @return iterable|string[]
69
+     * @return \Generator
70 70
      */
71 71
     private function getVariableNames(RuleInterface $rule): iterable
72 72
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Frontend/Builder/Value/NullValueBuilder.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
 
33 33
     /**
34 34
      * @param ContextInterface $ctx
35
-     * @param RuleInterface|AstValueInterface $rule
36
-     * @return mixed|Value
35
+     * @param RuleInterface $rule
36
+     * @return Value
37 37
      */
38 38
     public function reduce(ContextInterface $ctx, RuleInterface $rule)
39 39
     {
Please login to merge, or discard this patch.
src/Frontend/Builder/Value/StringValueBuilder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     /**
44 44
      * @param ContextInterface $ctx
45 45
      * @param RuleInterface $rule
46
-     * @return mixed|Value
46
+     * @return ValueInterface
47 47
      */
48 48
     public function reduce(ContextInterface $ctx, RuleInterface $rule): ValueInterface
49 49
     {
Please login to merge, or discard this patch.
src/Frontend/Builder/Value/TypeInvocationBuilder.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * @param ContextInterface $ctx
39 39
      * @param RuleInterface $rule
40
-     * @return \Generator|InvocationInterface
40
+     * @return \Generator
41 41
      * @throws TypeConflictException
42 42
      */
43 43
     public function reduce(ContextInterface $ctx, RuleInterface $rule): \Generator
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     /**
69 69
      * @param ContextInterface $ctx
70
-     * @param TypeNameInterface|ValueInterface $name
70
+     * @param ValueInterface $name
71 71
      * @return InvocationInterface
72 72
      */
73 73
     private function resolveName(ContextInterface $ctx, $name): InvocationInterface
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /**
96 96
      * @param ContextInterface $ctx
97 97
      * @param RuleInterface $rule
98
-     * @return \Generator|TypeNameInterface
98
+     * @return \Generator
99 99
      * @throws TypeConflictException
100 100
      */
101 101
     private function fetchArgumentName(ContextInterface $ctx, RuleInterface $rule): \Generator
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     /**
124 124
      * @param ContextInterface $ctx
125 125
      * @param RuleInterface $rule
126
-     * @return \Generator|ValueInterface
126
+     * @return \Generator
127 127
      */
128 128
     private function fetchArgumentValue(ContextInterface $ctx, RuleInterface $rule): \Generator
129 129
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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());
Please login to merge, or discard this patch.
src/Frontend/Deferred/Deferred.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     /**
47 47
      * @param mixed ...$args
48
-     * @return \Generator|mixed
48
+     * @return \Generator
49 49
      */
50 50
     public function __invoke(...$args)
51 51
     {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     /**
56 56
      * @param array $args
57
-     * @return \Generator|mixed
57
+     * @return \Generator
58 58
      */
59 59
     public function invoke(...$args): \Generator
60 60
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace Railt\SDL\Frontend\Deferred;
11 11
 
12
-use Railt\SDL\Frontend\Context\ContextInterface;
13
-
14 12
 /**
15 13
  * Class Deferred
16 14
  */
Please login to merge, or discard this patch.
src/Frontend/Deferred/Storage.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     }
50 50
 
51 51
     /**
52
-     * @return iterable|\Generator
52
+     * @return \Generator
53 53
      */
54 54
     public function getIterator(): iterable
55 55
     {
Please login to merge, or discard this patch.
src/Frontend/Definition/Storage.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         ) {
Please login to merge, or discard this patch.