Passed
Push — master ( d9516d...355c97 )
by
unknown
49s
created
src/Zicht/Itertools/mappings.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  */
17 17
 function lstrip($chars = " \t\n\r\0\x0B")
18 18
 {
19
-    return function ($value) use ($chars) {
19
+    return function($value) use ($chars) {
20 20
         return ltrim($value, $chars);
21 21
     };
22 22
 }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  */
30 30
 function rstrip($chars = " \t\n\r\0\x0B")
31 31
 {
32
-    return function ($value) use ($chars) {
32
+    return function($value) use ($chars) {
33 33
         return rtrim($value, $chars);
34 34
     };
35 35
 }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  */
43 43
 function strip($chars = " \t\n\r\0\x0B")
44 44
 {
45
-    return function ($value) use ($chars) {
45
+    return function($value) use ($chars) {
46 46
         return trim($value, $chars);
47 47
     };
48 48
 }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
  */
55 55
 function length()
56 56
 {
57
-    return function ($value) {
57
+    return function($value) {
58 58
         if (is_null($value)) {
59 59
             return 0;
60 60
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
  */
75 75
 function key()
76 76
 {
77
-    return function ($value, $key) {
77
+    return function($value, $key) {
78 78
         return $key;
79 79
     };
80 80
 }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
  */
87 87
 function lower()
88 88
 {
89
-    return function ($value) {
89
+    return function($value) {
90 90
         return strtolower($value);
91 91
     };
92 92
 }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
  */
99 99
 function upper()
100 100
 {
101
-    return function ($value) {
101
+    return function($value) {
102 102
         return strtoupper($value);
103 103
     };
104 104
 }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
  */
113 113
 function json_encode($options = 0, $depth = 512)
114 114
 {
115
-    return function ($value) use ($options, $depth) {
115
+    return function($value) use ($options, $depth) {
116 116
         return \json_encode($value, $options, $depth);
117 117
     };
118 118
 }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
  */
128 128
 function json_decode($assoc = false, $depth = 512, $options = 0)
129 129
 {
130
-    return function ($value) use ($assoc, $depth, $options) {
130
+    return function($value) use ($assoc, $depth, $options) {
131 131
         return \json_decode($value, $assoc, $depth, $options);
132 132
     };
133 133
 }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     $strategies = array_map('\Zicht\Itertools\conversions\mixed_to_value_getter', $strategies);
168 168
     $strategy = conversions\mixed_to_value_getter($strategy);
169 169
 
170
-    return function ($value, $key) use ($strategies, $strategy, $discardNull, $discardEmptyContainer) {
170
+    return function($value, $key) use ($strategies, $strategy, $discardNull, $discardEmptyContainer) {
171 171
         $value = $strategy($value);
172 172
         $res = [];
173 173
         foreach ($strategies as $strategyKey => $strategy) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         if ($discardNull || $discardEmptyContainer) {
177 177
             $res = array_filter(
178 178
                 $res,
179
-                function ($value) use ($discardNull, $discardEmptyContainer) {
179
+                function($value) use ($discardNull, $discardEmptyContainer) {
180 180
                     if (null === $value) {
181 181
                         return !$discardNull;
182 182
                     }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $max = getrandmax();
207 207
     }
208 208
 
209
-    return function () use ($min, $max) {
209
+    return function() use ($min, $max) {
210 210
         return rand($min, $max);
211 211
     };
212 212
 }
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 function type($strategy = null)
221 221
 {
222 222
     $strategy = conversions\mixed_to_value_getter($strategy);
223
-    return function ($value) use ($strategy) {
223
+    return function($value) use ($strategy) {
224 224
         $value = $strategy($value);
225 225
         return is_object($value) ? get_class($value) : gettype($value);
226 226
     };
Please login to merge, or discard this patch.