Test Failed
Push — master ( d59132...fd300c )
by Kirill
03:01
created
src/Stdlib/Scalar/FloatScalar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function parse($value): float
48 48
     {
49
-        if (! \is_scalar($value)) {
49
+        if (!\is_scalar($value)) {
50 50
             throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value)));
51 51
         }
52 52
 
53
-        return (float)parent::parse($value);
53
+        return (float) parent::parse($value);
54 54
     }
55 55
 
56 56
     /**
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function serialize($value): float
62 62
     {
63
-        if (! \is_scalar($value)) {
63
+        if (!\is_scalar($value)) {
64 64
             throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value)));
65 65
         }
66 66
 
67
-        return (float)parent::serialize($value);
67
+        return (float) parent::serialize($value);
68 68
     }
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
src/Stdlib/Scalar/IntScalar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function parse($value): int
48 48
     {
49
-        if (! \is_scalar($value)) {
49
+        if (!\is_scalar($value)) {
50 50
             throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value)));
51 51
         }
52 52
 
53
-        return (int)parent::parse($value);
53
+        return (int) parent::parse($value);
54 54
     }
55 55
 
56 56
     /**
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function serialize($value): int
62 62
     {
63
-        if (! \is_scalar($value)) {
63
+        if (!\is_scalar($value)) {
64 64
             throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value)));
65 65
         }
66 66
 
67
-        return (int)parent::serialize($value);
67
+        return (int) parent::serialize($value);
68 68
     }
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
src/Stdlib/Scalar/DateTimeScalar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
             return $value;
51 51
         }
52 52
 
53
-        if (! \is_scalar($value)) {
53
+        if (!\is_scalar($value)) {
54 54
             throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value)));
55 55
         }
56 56
 
57
-        return $this->parseDateTime((string)parent::parse($value));
57
+        return $this->parseDateTime((string) parent::parse($value));
58 58
     }
59 59
 
60 60
     /**
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
             return $value->format(\DateTime::RFC3339);
69 69
         }
70 70
 
71
-        if (! \is_scalar($value)) {
71
+        if (!\is_scalar($value)) {
72 72
             throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value)));
73 73
         }
74 74
 
75
-        return $this->parseDateTime((string)$value)
75
+        return $this->parseDateTime((string) $value)
76 76
             ->format(\DateTime::RFC3339);
77 77
     }
78 78
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     private function parseDateTime(string $value): \DateTimeInterface
85 85
     {
86 86
         try {
87
-            return new \DateTime((string)$value, new \DateTimeZone('UTC'));
87
+            return new \DateTime((string) $value, new \DateTimeZone('UTC'));
88 88
         } catch (\Throwable $e) {
89 89
             $message = \str_replace('DateTime::__construct(): ', '', $e->getMessage());
90 90
 
Please login to merge, or discard this patch.
src/Stdlib/Scalar/StringScalar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function parse($value): string
48 48
     {
49
-        if (! \is_scalar($value)) {
49
+        if (!\is_scalar($value)) {
50 50
             throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value)));
51 51
         }
52 52
 
53
-        return (string)$value;
53
+        return (string) $value;
54 54
     }
55 55
 
56 56
     /**
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function serialize($value): string
62 62
     {
63
-        if (! \is_scalar($value)) {
63
+        if (!\is_scalar($value)) {
64 64
             throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value)));
65 65
         }
66 66
 
67
-        return (string)$value;
67
+        return (string) $value;
68 68
     }
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
src/Definition/Behaviour/HasInheritance.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     abstract protected function fetch($type): TypeDefinition;
35 35
 
36 36
     /**
37
-     * @return iterable|TypeDefinition[]
37
+     * @return \Generator
38 38
      */
39 39
     public function inheritedBy(): iterable
40 40
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     /**
102
-     * @param TypeDefinition|string $type
102
+     * @param TypeDefinition $type
103 103
      * @return bool
104 104
      */
105 105
     public function instanceOf($type): bool
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
      * @param TypeDefinition|string $type
104 104
      * @return bool
105 105
      */
106
-    public function instanceOf($type): bool
106
+    public function instanceof($type): bool
107 107
     {
108 108
         /**
109 109
          * @var TypeDefinition $type
Please login to merge, or discard this patch.
src/Contracts/Definition/Behaviour/ProvidesInheritance.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,5 +51,5 @@
 block discarded – undo
51 51
      * @param TypeDefinition|string $definition
52 52
      * @return bool
53 53
      */
54
-    public function instanceOf($definition): bool;
54
+    public function instanceof($definition): bool;
55 55
 }
Please login to merge, or discard this patch.
src/Common/Jsonable.php 1 patch
Doc Comments   +2 added lines, -2 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|string[]
53
+     * @return \Generator
54 54
      */
55 55
     private function jsonNonRenderableTypes(): iterable
56 56
     {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return iterable|string[]
62
+     * @return \Generator
63 63
      */
64 64
     private function jsonNonRenderableFields(): iterable
65 65
     {
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,16 +30,16 @@
 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($definition): bool
40
+    public function instanceof($definition): bool
41 41
     {
42
-        return $this->isImplements($definition) || parent::instanceOf($definition);
42
+        return $this->isImplements($definition) || parent::instanceof($definition);
43 43
     }
44 44
 
45 45
 
Please login to merge, or discard this patch.
src/Contracts/TypeInterface.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 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,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     public const ALLOWS_TO_OUTPUT = [
142 142
         self::SCALAR,
143 143
         self::OBJECT,
144
-        self::INTERFACE,
144
+        self::interface,
145 145
         self::UNION,
146 146
         self::ENUM,
147 147
         self::INPUT_OBJECT,
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      * @var string[]|array[]
159 159
      */
160 160
     public const INHERITANCE_TREE = [
161
-        self::INTERFACE => [
161
+        self::interface => [
162 162
             self::OBJECT => [
163 163
                 self::INPUT_OBJECT
164 164
             ],
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      * @param TypeInterface $type
196 196
      * @return bool
197 197
      */
198
-    public function instanceOf(TypeInterface $type): bool;
198
+    public function instanceof(TypeInterface $type): bool;
199 199
 
200 200
     /**
201 201
      * @param string $type
Please login to merge, or discard this patch.