Test Failed
Push — master ( 3b7232...dbe410 )
by Kirill
02:20
created
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/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
@@ -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/Common/Renderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $name = \ucwords(\mb_strtolower(\preg_replace('/\W+/u', ' ', $name)));
24 24
 
25
-        return (string)\str_replace(' ', '', $name);
25
+        return (string) \str_replace(' ', '', $name);
26 26
     }
27 27
 
28 28
     /**
Please login to merge, or discard this patch.
src/Document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
      */
138 138
     public function getDefinition(string $name): ?TypeDefinition
139 139
     {
140
-        if (! \in_array($name, $this->types, true)) {
140
+        if (!\in_array($name, $this->types, true)) {
141 141
             return null;
142 142
         }
143 143
 
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
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
      */
31 31
     public static function getType(): TypeInterface
32 32
     {
33
-        return Type::of(Type::INTERFACE);
33
+        return Type::of(Type::interface);
34 34
     }
35 35
 
36 36
     /**
37 37
      * @param TypeDefinition $definition
38 38
      * @return bool
39 39
      */
40
-    public function instanceOf(TypeDefinition $definition): bool
40
+    public function instanceof(TypeDefinition $definition): bool
41 41
     {
42
-        return $this->isImplementsDefinition($definition) || parent::instanceOf($definition);
42
+        return $this->isImplementsDefinition($definition) || parent::instanceof($definition);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
src/Dictionary/CallbackDictionary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
     private function invoke(string $name, TypeDefinition $from = null): void
51 51
     {
52 52
         foreach ($this->callbacks as $callback) {
53
-            if (! $this->has($name)) {
54
-                $callback($name, $from, function (TypeDefinition $type): void {
53
+            if (!$this->has($name)) {
54
+                $callback($name, $from, function(TypeDefinition $type): void {
55 55
                     $this->add($type);
56 56
                 });
57 57
             }
Please login to merge, or discard this patch.
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.