Test Failed
Push — master ( da2c9c...d0cc4d )
by Kirill
02:03
created
src/Definition/Behaviour/HasInterfaces.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     }
42 42
 
43 43
     /**
44
-     * @return iterable|InterfaceDefinition[]
44
+     * @return \Generator
45 45
      */
46 46
     public function getInterfaces(): iterable
47 47
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      */
67 67
     public function getInterface(string $name): InterfaceDefinition
68 68
     {
69
-        if (! \in_array($name, $this->interfaces, true)) {
69
+        if (!\in_array($name, $this->interfaces, true)) {
70 70
             $error = \sprintf('%s does not contain an interface named "%s"', $this, $name);
71 71
             throw new TypeNotFoundException($error);
72 72
         }
Please login to merge, or discard this patch.
src/Definition/InterfaceDefinition.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
      */
29 29
     public static function getType(): TypeInterface
30 30
     {
31
-        return Type::of(Type::INTERFACE);
31
+        return Type::of(Type::interface);
32 32
     }
33 33
 
34 34
     /**
35 35
      * @param TypeDefinition $definition
36 36
      * @return bool
37 37
      */
38
-    public function instanceOf(TypeDefinition $definition): bool
38
+    public function instanceof(TypeDefinition $definition): bool
39 39
     {
40
-        return $this->instanceOfInterface($definition) || parent::instanceOf($definition);
40
+        return $this->instanceOfInterface($definition) || parent::instanceof($definition);
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
src/Definition/Behaviour/HasDeprecation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
      */
44 44
     public function getDeprecationReason(): string
45 45
     {
46
-        return (string)$this->deprecation;
46
+        return (string) $this->deprecation;
47 47
     }
48 48
 }
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
@@ -36,5 +36,5 @@
 block discarded – undo
36 36
      * @param TypeDefinition $definition
37 37
      * @return bool
38 38
      */
39
-    public function instanceOf(TypeDefinition $definition): bool;
39
+    public function instanceof(TypeDefinition $definition): bool;
40 40
 }
Please login to merge, or discard this patch.
src/Type.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      * @param TypeInterface $type
68 68
      * @return bool
69 69
      */
70
-    public function instanceOf(TypeInterface $type): bool
70
+    public function instanceof(TypeInterface $type): bool
71 71
     {
72 72
         return $this instanceof $type;
73 73
     }
Please login to merge, or discard this patch.
src/AbstractTypeDefinition.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     public function getDescription(): string
50 50
     {
51
-        return (string)$this->description;
51
+        return (string) $this->description;
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      * @param TypeDefinition $definition
64 64
      * @return bool
65 65
      */
66
-    public function instanceOf(TypeDefinition $definition): bool
66
+    public function instanceof(TypeDefinition $definition): bool
67 67
     {
68 68
         return $this instanceof $definition;
69 69
     }
Please login to merge, or discard this patch.
src/Document.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     }
108 108
 
109 109
     /**
110
-     * @return iterable|TypeDefinition[]
110
+     * @return \Generator
111 111
      * @throws TypeNotFoundException
112 112
      */
113 113
     public function getTypeDefinitions(): iterable
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
      */
133 133
     public function getTypeDefinition(string $name): ?TypeDefinition
134 134
     {
135
-        if (! \in_array($name, $this->types, true)) {
135
+        if (!\in_array($name, $this->types, true)) {
136 136
             return null;
137 137
         }
138 138
 
Please login to merge, or discard this patch.
src/Reflection.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
      * @param Type|null $of
55
-     * @return iterable|TypeDefinition[]
55
+     * @return \Generator
56 56
      */
57 57
     public function all(Type $of = null): iterable
58 58
     {
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\Contracts\Document as DocumentInterface;
15 15
 use Railt\Reflection\Contracts\Reflection as ReflectionInterface;
16 16
 use Railt\Reflection\Contracts\Type;
17
-use Railt\Reflection\Exception\TypeConflictException;
18 17
 use Railt\Reflection\Exception\TypeNotFoundException;
19 18
 
20 19
 /**
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
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @var string
29 29
      */
30
-    public const INTERFACE = 'Interface';
30
+    public const interface = 'Interface';
31 31
 
32 32
     /**
33 33
      * @var string
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public const ROOT_TYPES = [
103 103
         self::SCALAR,
104 104
         self::OBJECT,
105
-        self::INTERFACE,
105
+        self::interface,
106 106
         self::UNION,
107 107
         self::ENUM,
108 108
         self::INPUT_OBJECT,
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public const INHERITANCE_TREE = [
117 117
         self::ANY => [
118
-            self::INTERFACE => [
118
+            self::interface => [
119 119
                 self::OBJECT => [
120 120
                     self::INPUT_OBJECT,
121 121
                 ],
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      * @param Type $type
144 144
      * @return bool
145 145
      */
146
-    public function instanceOf(Type $type): bool;
146
+    public function instanceof(Type $type): bool;
147 147
 
148 148
     /**
149 149
      * @return string
Please login to merge, or discard this patch.