Completed
Push — master ( c1a156...8cadde )
by Kirill
08:14
created
src/Ast/Common/TypeHintNode.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-     * @param RuleInterface|NodeInterface $rule
55
+     * @param null|NodeInterface $rule
56 56
      * @return \Generator
57 57
      */
58 58
     private function analyze(RuleInterface $rule): \Generator
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function isList(): bool
72 72
     {
73
-        return (bool)($this->modifiers & Hint::IS_LIST);
73
+        return (bool) ($this->modifiers & Hint::IS_LIST);
74 74
     }
75 75
 
76 76
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function isNonNull(): bool
80 80
     {
81
-        return (bool)($this->modifiers & Hint::IS_NOT_NULL);
81
+        return (bool) ($this->modifiers & Hint::IS_NOT_NULL);
82 82
     }
83 83
 
84 84
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function isListOfNonNulls(): bool
88 88
     {
89
-        return (bool)($this->modifiers & Hint::IS_LIST_OF_NOT_NULL);
89
+        return (bool) ($this->modifiers & Hint::IS_LIST_OF_NOT_NULL);
90 90
     }
91 91
 
92 92
     /**
Please login to merge, or discard this patch.
src/Ast/Support/ArgumentsProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 trait ArgumentsProvider
19 19
 {
20 20
     /**
21
-     * @return iterable|ArgumentDefinitionNode[]
21
+     * @return \Generator
22 22
      */
23 23
     public function getArgumentNodes(): iterable
24 24
     {
Please login to merge, or discard this patch.
src/Ast/Support/DirectivesProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 trait DirectivesProvider
18 18
 {
19 19
     /**
20
-     * @return iterable|DirectiveInvocationNode[]
20
+     * @return \Generator
21 21
      */
22 22
     public function getDirectiveNodes(): iterable
23 23
     {
Please login to merge, or discard this patch.
src/Ast/Support/FieldsProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 trait FieldsProvider
19 19
 {
20 20
     /**
21
-     * @return iterable|FieldDefinitionNode[]
21
+     * @return \Generator
22 22
      */
23 23
     public function getFieldNodes(): iterable
24 24
     {
Please login to merge, or discard this patch.
src/Ast/Support/InterfacesProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 trait InterfacesProvider
19 19
 {
20 20
     /**
21
-     * @return iterable|TypeNameNode[]
21
+     * @return \Generator
22 22
      */
23 23
     public function getInterfaceNodes(): iterable
24 24
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 namespace Railt\SDL\Ast\Support;
11 11
 
12 12
 use Railt\SDL\Ast\Common\TypeNameNode;
13
-use Railt\SDL\Ast\ProvidesInterfaceNodes;
14 13
 
15 14
 /**
16 15
  * Trait InterfacesProvider
Please login to merge, or discard this patch.
src/Compiler.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use Railt\Io\File;
16 16
 use Railt\Io\Readable;
17 17
 use Railt\Parser\Ast\RuleInterface;
18
-use Railt\Parser\Exception\UnexpectedTokenException;
19 18
 use Railt\Parser\Exception\UnrecognizedTokenException;
20 19
 use Railt\Reflection\Contracts\Document as DocumentInterface;
21 20
 use Railt\Reflection\Contracts\Reflection as ReflectionInterface;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     public function compile(Readable $file): DocumentInterface
109 109
     {
110 110
         try {
111
-            return $this->memoize($file, function (Readable $file): DocumentInterface {
111
+            return $this->memoize($file, function(Readable $file): DocumentInterface {
112 112
                 return $this->builder->run($this->reflection, $file, $this->parse($file));
113 113
             });
114 114
         } catch (CompilerException $e) {
Please login to merge, or discard this patch.
src/Compiler/Builder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
     }
93 93
 
94 94
     /**
95
-     * @param ProvidesDefinition|RuleInterface $rule
95
+     * @param RuleInterface $rule
96 96
      * @param DefinitionInterface $parent
97 97
      * @return DefinitionInterface
98 98
      * @throws CompilerException
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
      */
100 100
     private function buildDefinition(RuleInterface $rule, DefinitionInterface $parent): DefinitionInterface
101 101
     {
102
-        if (! $rule instanceof ProvidesDefinition) {
102
+        if (!$rule instanceof ProvidesDefinition) {
103 103
             $error = \vsprintf('%s AST should implement %s interface', [
104 104
                 $rule->getName(), ProvidesDefinition::class]);
105 105
 
Please login to merge, or discard this patch.
src/Compiler/System/ImplementationSystem.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 class ImplementationSystem extends System
28 28
 {
29 29
     /**
30
-     * @param Definition|ProvidesInterfaces|HasInterfaces $parent
31
-     * @param RuleInterface|ProvidesInterfaceNodes $ast
30
+     * @param Definition $parent
31
+     * @param RuleInterface $ast
32 32
      */
33 33
     public function resolve(Definition $parent, RuleInterface $ast): void
34 34
     {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-     * @param ProvidesInterfaces|HasInterfaces|TypeDefinition $parent
53
+     * @param ProvidesInterfaces $parent
54 54
      * @param TypeNameNode $ast
55 55
      * @throws \Railt\Io\Exception\ExternalFileException
56 56
      * @throws \Railt\Reflection\Exception\TypeNotFoundException
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             });
41 41
 
42 42
             if ($parent instanceof ObjectDefinition) {
43
-                $this->inference(function () use ($parent) {
43
+                $this->inference(function() use ($parent) {
44 44
                     foreach ($parent->getInterfaces() as $interface) {
45 45
                         $this->verifyFieldsInheritance($parent, $interface);
46 46
                     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     private function verifyIsInterface(Definition $parent, TypeDefinition $definition): void
90 90
     {
91
-        if (! $definition instanceof InterfaceDefinition) {
91
+        if (!$definition instanceof InterfaceDefinition) {
92 92
             $error = '%s can implement only interfaces, but %s given';
93 93
             throw new TypeConflictException(\sprintf($error, $parent, $definition));
94 94
         }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     private function verifySelfReferenceImplementation(ProvidesInterfaces $parent, TypeDefinition $interface): void
117 117
     {
118 118
         if ($parent->isImplements($parent)) {
119
-            $error = 'Can not implement the interface %s by %s, ' .
119
+            $error = 'Can not implement the interface %s by %s, '.
120 120
                 'because it contains a reference to the already implemented type %s';
121 121
             $error = \sprintf($error, $interface, $parent, $parent);
122 122
 
Please login to merge, or discard this patch.
src/Compiler/System/Provider/ArgumentSystem.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 class ArgumentSystem extends System
23 23
 {
24 24
     /**
25
-     * @param Definition|HasArguments $definition
25
+     * @param Definition $definition
26 26
      * @param RuleInterface $ast
27 27
      */
28 28
     public function resolve(Definition $definition, RuleInterface $ast): void
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Railt\Reflection\Definition\Behaviour\HasArguments;
15 15
 use Railt\SDL\Ast\ProvidesArgumentNodes;
16 16
 use Railt\SDL\Compiler\System\System;
17
-use Railt\SDL\Exception\TypeConflictException;
18 17
 
19 18
 /**
20 19
  * Class ArgumentSystem
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
     {
30 30
         if ($ast instanceof ProvidesArgumentNodes) {
31 31
             foreach ($ast->getArgumentNodes() as $child) {
32
-                $this->deferred(function () use ($definition, $child) {
32
+                $this->deferred(function() use ($definition, $child) {
33 33
                     /** @var Definition\Dependent\ArgumentDefinition $argument */
34 34
                     $argument = $this->process->build($child, $definition);
35 35
 
36
-                    $this->linker(function () use ($definition, $argument) {
36
+                    $this->linker(function() use ($definition, $argument) {
37 37
                         if ($definition->hasArgument($argument->getName())) {
38 38
                             throw $this->redeclareException($argument);
39 39
                         }
Please login to merge, or discard this patch.