Completed
Push — master ( dca610...02a711 )
by Chris
03:06
created
src/Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     /**
13 13
      * Nullable types are either explicitly ?type (PHP>=7.1) or with a default value of null
14 14
      */
15
-    const NULLABLE  = 0x02;
15
+    const NULLABLE = 0x02;
16 16
 
17 17
     /**
18 18
      * Reference types must always match
Please login to merge, or discard this patch.
src/CallbackType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -171,17 +171,17 @@
 block discarded – undo
171 171
         }
172 172
 
173 173
         if (isset($this->parameters[$l])) {
174
-            $string .= $this->parameters[$i] . ' ';
174
+            $string .= $this->parameters[$i].' ';
175 175
         }
176 176
 
177 177
         if ($o) {
178
-            $string .= str_repeat(']', $o) . ' ';
178
+            $string .= str_repeat(']', $o).' ';
179 179
         }
180 180
 
181 181
         $string .= ')';
182 182
 
183 183
         if ($this->returnType->typeName !== null) {
184
-            $string .= ' : ' . $this->returnType;
184
+            $string .= ' : '.$this->returnType;
185 185
         }
186 186
 
187 187
         return $string;
Please login to merge, or discard this patch.
src/ParameterType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 $string .= '?';
112 112
             }
113 113
 
114
-            $string .= $this->typeName . ' ';
114
+            $string .= $this->typeName.' ';
115 115
         }
116 116
 
117 117
         if ($this->isByReference) {
@@ -122,6 +122,6 @@  discard block
 block discarded – undo
122 122
             $string .= '...';
123 123
         }
124 124
 
125
-        return $string . '$' . $this->parameterName;
125
+        return $string.'$'.$this->parameterName;
126 126
     }
127 127
 }
Please login to merge, or discard this patch.
src/InvalidCallbackException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace DaveRandom\CallbackValidator;
4 4
 
5
-class InvalidCallbackException extends \LogicException {}
5
+class InvalidCallbackException extends \LogicException
6
+{
7
+}
Please login to merge, or discard this patch.
src/BuiltInTypes.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
     /**
8 8
      * Thou shalt not instantiate
9 9
      */
10
-    private function __construct() { }
10
+    private function __construct()
11
+    {
12
+}
11 13
 
12 14
     const STRING   = 'string';
13 15
     const INT      = 'int';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
     const INT      = 'int';
14 14
     const FLOAT    = 'float';
15 15
     const BOOL     = 'bool';
16
-    const ARRAY    = 'array';
16
+    const array    = 'array';
17 17
     const VOID     = 'void';
18
-    const CALLABLE = 'callable';
18
+    const callable = 'callable';
19 19
     const ITERABLE = 'iterable';
20 20
 }
Please login to merge, or discard this patch.
src/MatchTester.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
     /**
8 8
      * Thou shalt not instantiate
9 9
      */
10
-    private function __construct() { }
10
+    private function __construct()
11
+    {
12
+}
11 13
 
12 14
     /**
13 15
      * Lookup table of all built-in types
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
         BuiltInTypes::INT      => true,
18 18
         BuiltInTypes::FLOAT    => true,
19 19
         BuiltInTypes::BOOL     => true,
20
-        BuiltInTypes::ARRAY    => true,
21
-        BuiltInTypes::CALLABLE => true,
20
+        BuiltInTypes::array    => true,
21
+        BuiltInTypes::callable => true,
22 22
         BuiltInTypes::VOID     => true,
23 23
         BuiltInTypes::ITERABLE => true,
24 24
     ];
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
 
70 70
         // Check iterable
71 71
         if ($superTypeName === BuiltInTypes::ITERABLE) {
72
-            return $subTypeName === BuiltInTypes::ARRAY
72
+            return $subTypeName === BuiltInTypes::array
73 73
                 || $subTypeName === \Traversable::class
74 74
                 || \is_subclass_of($subTypeName, \Traversable::class);
75 75
         }
76 76
 
77 77
         // Check callable
78
-        if ($superTypeName === BuiltInTypes::CALLABLE) {
78
+        if ($superTypeName === BuiltInTypes::callable) {
79 79
             return $subTypeName === \Closure::class
80 80
                 || \method_exists($subTypeName, '__invoke')
81 81
                 || \is_subclass_of($subTypeName, \Closure::class);
Please login to merge, or discard this patch.
src/ReturnType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     public function __toString()
58 58
     {
59 59
         return $this->isNullable && $this->typeName !== null
60
-            ? '?' . $this->typeName
60
+            ? '?'.$this->typeName
61 61
             : (string)$this->typeName;
62 62
     }
63 63
 }
Please login to merge, or discard this patch.