Test Failed
Push — master ( 3b7232...dbe410 )
by Kirill
02:20
created
src/Definition/Behaviour/HasInheritance.php 2 patches
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     protected $parents = [];
26 26
 
27 27
     /**
28
-     * @return iterable|TypeDefinition[]
28
+     * @return \Generator
29 29
      */
30 30
     public function getParents(): iterable
31 31
     {
@@ -54,7 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
     /**
56 56
      * @param TypeDefinition ...$definitions
57
-     * @return ProvidesInheritance|$this
57
+     * @param TypeDefinition[] $definitions
58
+     * @return TypeDefinition[]
58 59
      * @throws TypeConflictException
59 60
      */
60 61
     public function extends(TypeDefinition ...$definitions): ProvidesInheritance
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      */
75 75
     private function verifyExtensionType(TypeDefinition $def): void
76 76
     {
77
-        if (! $this::typeOf($def::getType())) {
77
+        if (!$this::typeOf($def::getType())) {
78 78
             $error = \sprintf('Type %s can extends only %s types, but %s given.', $this, static::getType(), $def);
79 79
             throw new TypeConflictException($error);
80 80
         }
Please login to merge, or discard this patch.
src/Definition/Behaviour/HasInterfaces.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-     * @return iterable|InterfaceDefinition[]
53
+     * @return \Generator
54 54
      */
55 55
     public function getInterfaces(): iterable
56 56
     {
@@ -79,6 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     /**
81 81
      * @param InterfaceDefinition ...$interfaces
82
+     * @param InterfaceDefinition[] $interfaces
82 83
      * @return ProvidesInterfaces|$this
83 84
      */
84 85
     public function implements(InterfaceDefinition ...$interfaces): ProvidesInterfaces
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Railt\Reflection\Contracts\Definition\Behaviour\ProvidesInterfaces;
13 13
 use Railt\Reflection\Contracts\Definition\InterfaceDefinition;
14 14
 use Railt\Reflection\Contracts\Definition\TypeDefinition;
15
-use Railt\Reflection\Exception\TypeNotFoundException;
16 15
 
17 16
 /**
18 17
  * Trait HasInterfaces
Please login to merge, or discard this patch.
src/Definition/Behaviour/HasTypeIndication.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -67,6 +67,7 @@
 block discarded – undo
67 67
 
68 68
     /**
69 69
      * @param int ...$values
70
+     * @param integer[] $values
70 71
      * @return ProvidesTypeIndication|$this
71 72
      */
72 73
     public function withModifiers(int ...$values): ProvidesTypeIndication
Please login to merge, or discard this patch.
src/Contracts/Type.php 1 patch
Upper-Lower-Casing   +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
      * @var string
39 39
      */
40
-    public const INTERFACE = 'Interface';
40
+    public const interface = 'Interface';
41 41
 
42 42
     /**
43 43
      * @var string
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public const ROOT_TYPES = [
114 114
         self::SCALAR,
115 115
         self::OBJECT,
116
-        self::INTERFACE,
116
+        self::interface,
117 117
         self::UNION,
118 118
         self::ENUM,
119 119
         self::INPUT_OBJECT,
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      * @var string[]|array[]
132 132
      */
133 133
     public const INHERITANCE_TREE = [
134
-        self::INTERFACE => [
134
+        self::interface => [
135 135
             self::OBJECT => [
136 136
                 self::INPUT_OBJECT => [
137 137
                     self::DIRECTIVE
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param Type $type
161 161
      * @return bool
162 162
      */
163
-    public function instanceOf(Type $type): bool;
163
+    public function instanceof(Type $type): bool;
164 164
 
165 165
     /**
166 166
      * @param string $type
Please login to merge, or discard this patch.
src/Contracts/Definition/Dependent/DirectiveLocation.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
      * @version SDL June 2018
111 111
      * @var string
112 112
      */
113
-    public const INTERFACE           = 'INTERFACE';
113
+    public const INTERFACE = 'INTERFACE';
114 114
 
115 115
     /**
116 116
      * @version SDL June 2018
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @version SDL June 2018
111 111
      * @var string
112 112
      */
113
-    public const INTERFACE           = 'INTERFACE';
113
+    public const interface           = 'INTERFACE';
114 114
 
115 115
     /**
116 116
      * @version SDL June 2018
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     public const SDL_LOCATIONS = [
162 162
         self::SCALAR,
163 163
         self::OBJECT,
164
-        self::INTERFACE,
164
+        self::interface,
165 165
         self::UNION,
166 166
         self::ENUM,
167 167
         self::INPUT_OBJECT,
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     public const LOCATION_TO_TYPES = [
182 182
         self::SCALAR                 => Type::SCALAR,
183 183
         self::OBJECT                 => Type::OBJECT,
184
-        self::INTERFACE              => Type::INTERFACE,
184
+        self::interface              => Type::interface,
185 185
         self::UNION                  => Type::UNION,
186 186
         self::ENUM                   => Type::ENUM,
187 187
         self::INPUT_OBJECT           => Type::INPUT_OBJECT,
Please login to merge, or discard this patch.
src/Contracts/Definition/TypeDefinition.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * @param TypeDefinition $definition
39 39
      * @return bool
40 40
      */
41
-    public function instanceOf(TypeDefinition $definition): bool;
41
+    public function instanceof(TypeDefinition $definition): bool;
42 42
 
43 43
     /**
44 44
      * @return Dictionary
Please login to merge, or discard this patch.
src/Type.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     private function bootInheritance(\SplStack $stack, array $children = []): void
72 72
     {
73
-        $push = function (string $type) use ($stack): void {
73
+        $push = function(string $type) use ($stack): void {
74 74
             self::$inheritance[$type] = \array_values(\iterator_to_array($stack));
75 75
             self::$inheritance[$type][] = static::ROOT_TYPE;
76 76
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      * @param TypeInterface $type
115 115
      * @return bool
116 116
      */
117
-    public function instanceOf(TypeInterface $type): bool
117
+    public function instanceof(TypeInterface $type): bool
118 118
     {
119 119
         $needle = $type->getName();
120 120
 
Please login to merge, or discard this patch.
src/AbstractTypeDefinition.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
      * @param TypeDefinition $definition
89 89
      * @return bool
90 90
      */
91
-    public function instanceOf(TypeDefinition $definition): bool
91
+    public function instanceof(TypeDefinition $definition): bool
92 92
     {
93 93
         if ($definition::getType()->is(Type::ANY)) {
94 94
             return true;
Please login to merge, or discard this patch.
src/Stdlib/GraphQLDocument.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * @var string
34 34
      */
35
-    public const STDLIB_SCHEMA_PATH = __DIR__ . '/../../resources/stdlib.graphqls';
35
+    public const STDLIB_SCHEMA_PATH = __DIR__.'/../../resources/stdlib.graphqls';
36 36
 
37 37
     /**
38 38
      * GraphQLDocument constructor.
Please login to merge, or discard this patch.