Passed
Push — main ( ac9541...4dbf6b )
by Breno
01:44
created
src/Add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     $added = 0;
18 18
     foreach ($elements as $element) {
19
-        if (! in_array($element, $set, true)) {
19
+        if (!in_array($element, $set, true)) {
20 20
             $set[] = $element;
21 21
             $added++;
22 22
         }
Please login to merge, or discard this patch.
src/array_functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 function none(iterable $items, callable $callback, int $mode = 0): bool
51 51
 {
52
-    return ! some($items, $callback, $mode);
52
+    return !some($items, $callback, $mode);
53 53
 }
54 54
 
55 55
 function at_least(int $n, iterable $items, callable $callback, int $mode = CALLBACK_USE_VALUE): bool
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
 function has(array $items, ...$keys): bool
155 155
 {
156
-    return ! array_diff($keys, array_keys($items));
156
+    return !array_diff($keys, array_keys($items));
157 157
 }
158 158
 
159 159
 function only(array $items, ...$keys): array
Please login to merge, or discard this patch.
src/Flatten.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
             $keys[] = $iterator->getSubIterator($depth)->key();
22 22
         }
23 23
 
24
-        if (! empty($pathSeparator)) {
25
-            $result[join($pathSeparator, $keys) ] = $leafValue;
24
+        if (!empty($pathSeparator)) {
25
+            $result[join($pathSeparator, $keys)] = $leafValue;
26 26
         } else {
27 27
             $result[] = $leafValue;
28 28
         }
Please login to merge, or discard this patch.
src/DotNotation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
 function set_path(array &$haystack, string $path, $value, string $separator = '.'): void
14 14
 {
15 15
     $path = explode($separator, $path);
16
-    $temp =& $haystack;
16
+    $temp = & $haystack;
17 17
 
18 18
     foreach ($path as $key) {
19 19
         if (!is_array($temp)) {
20 20
             $temp = [];
21 21
         }
22 22
 
23
-        $temp =& $temp[$key];
23
+        $temp = & $temp[$key];
24 24
     }
25 25
 
26 26
     $temp = $value;
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     return
39 39
         array_reduce(
40 40
             explode($separator, $path),
41
-            fn ($arr, $key) =>
42
-            $default!== $arr && is_array($arr) && array_key_exists($key, $arr) ? $arr[$key] : $default,
41
+            fn($arr, $key) =>
42
+            $default !== $arr && is_array($arr) && array_key_exists($key, $arr) ? $arr[$key] : $default,
43 43
             $haystack
44 44
         );
45 45
 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     $target = &$haystack;
62 62
     foreach ($keys as $innerKey) {
63
-        if (! is_array($target)) {
63
+        if (!is_array($target)) {
64 64
             break;
65 65
         }
66 66
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     $target = $haystack;
90 90
     foreach ($keys as $innerKey) {
91
-        if (! is_array($target) || ! array_key_exists($innerKey, $target)) {
91
+        if (!is_array($target) || !array_key_exists($innerKey, $target)) {
92 92
             return false;
93 93
         }
94 94
 
Please login to merge, or discard this patch.