Passed
Push — master ( ccb861...442b95 )
by Rick
06:46 queued 01:16
created
src/Reflection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		if (!method_exists(\ReflectionClass::class, $method))
61 61
 			throw new \InvalidArgumentException('Cannot create closure from method ReflectionClass::' . $method . ', it does not exist');
62 62
 
63
-		return function ($value) use ($method, $arguments)
63
+		return function($value) use ($method, $arguments)
64 64
 		{
65 65
 			if (!Types::string()($value))
66 66
 				return false;
Please login to merge, or discard this patch.
src/Types.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	 */
74 74
 	public static function instanceof(string $class): \Closure
75 75
 	{
76
-		return function ($value) use ($class)
76
+		return function($value) use ($class)
77 77
 		{
78 78
 			return $value instanceof $class;
79 79
 		};
Please login to merge, or discard this patch.
src/Ranges.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 		if ($maximumLength < 0 || $maximumLength < 1)
23 23
 			throw new \InvalidArgumentException('Minimum length cannot be below 0, maximum length cannot be below 1');
24 24
 
25
-		return function ($value) use ($minimumLength, $maximumLength)
25
+		return function($value) use ($minimumLength, $maximumLength)
26 26
 		{
27 27
 			return Types::string()($value) && static::intBetween($minimumLength, $maximumLength)(strlen($value));
28 28
 		};
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         if ($maximum <= $minimum)
40 40
             throw new \InvalidArgumentException('Maximum can not be lesser than or equal to minimum.');
41 41
         
42
-		return function ($value) use ($minimum, $maximum)
42
+		return function($value) use ($minimum, $maximum)
43 43
 		{
44 44
 			return Types::int()($value) && ($value >= $minimum && $value <= $maximum);
45 45
 		};
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         if ($maximum <= $minimum)
57 57
             throw new \InvalidArgumentException('Maximum can not be lesser than or equal to minimum.');
58 58
         
59
-        return function ($value) use ($minimum, $maximum)
59
+        return function($value) use ($minimum, $maximum)
60 60
         {
61 61
             return Types::int()($value) && ($value > $minimum && $value < $maximum);
62 62
         };
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         if ($maximum <= $minimum)
74 74
             throw new \InvalidArgumentException('Maximum can not be lesser than or equal to minimum.');
75 75
         
76
-		return function ($value) use ($minimum, $maximum)
76
+		return function($value) use ($minimum, $maximum)
77 77
 		{
78 78
 			return Types::float()($value) && ($value >= $minimum && $value <= $maximum);
79 79
 		};
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         if ($maximum <= $minimum)
91 91
             throw new \InvalidArgumentException('Maximum can not be lesser than or equal to minimum.');
92 92
         
93
-        return function ($value) use ($minimum, $maximum)
93
+        return function($value) use ($minimum, $maximum)
94 94
         {
95 95
             return Types::float()($value) && ($value > $minimum && $value < $maximum);
96 96
         };
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public static function enum(...$allowedValues): \Closure
105 105
 	{
106
-		return function ($value) use ($allowedValues)
106
+		return function($value) use ($allowedValues)
107 107
 		{
108 108
 			return in_array($value, $allowedValues, true);
109 109
 		};
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public static function typeEnum(...$allowedTypes): \Closure
118 118
 	{
119
-		return function ($value) use ($allowedTypes)
119
+		return function($value) use ($allowedTypes)
120 120
 		{
121 121
 			return in_array(gettype($value), $allowedTypes, true);
122 122
 		};
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		if (!Utils::validateArray(Types::string(), $allowedValues))
133 133
 			throw new \InvalidArgumentException('Ranges::stringOneOf expects arguments of type string only');
134 134
 
135
-		return function ($value) use ($allowedValues)
135
+		return function($value) use ($allowedValues)
136 136
 		{
137 137
 			return Types::string() && in_array($value, $allowedValues);
138 138
 		};
Please login to merge, or discard this patch.
src/Utils.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	 */
18 18
 	public static function invert(\Closure $closure): \Closure
19 19
 	{
20
-		return function ($value) use ($closure)
20
+		return function($value) use ($closure)
21 21
 		{
22 22
 			return !$closure($value);
23 23
 		};
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 */
32 32
 	public static function merge(\Closure $closure1, \Closure $closure2): \Closure
33 33
 	{
34
-		return function ($value) use ($closure1, $closure2)
34
+		return function($value) use ($closure1, $closure2)
35 35
 		{
36 36
 			return $closure1($value) || $closure2($value);
37 37
 		};
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public static function both(\Closure $closure1, \Closure $closure2): \Closure
47 47
 	{
48
-		return function ($value) use ($closure1, $closure2)
48
+		return function($value) use ($closure1, $closure2)
49 49
 		{
50 50
 			return $closure1($value) && $closure2($value);
51 51
 		};
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         if (version_compare(PHP_VERSION, '7.1.0', '>='))
78 78
             return \Closure::fromCallable($callable);
79 79
         
80
-        return function ($value) use ($callable)
80
+        return function($value) use ($callable)
81 81
         {
82 82
             return $callable($value);
83 83
         };
Please login to merge, or discard this patch.