@@ -16,7 +16,7 @@ |
||
| 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 | } |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | $keys[] = $iterator->getSubIterator($depth)->key(); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - if (! empty($separator)) { |
|
| 22 | - $result[join($separator, $keys) ] = $leafValue; |
|
| 21 | + if (!empty($separator)) { |
|
| 22 | + $result[join($separator, $keys)] = $leafValue; |
|
| 23 | 23 | } else { |
| 24 | 24 | $result[] = $leafValue; |
| 25 | 25 | } |
@@ -60,11 +60,11 @@ discard block |
||
| 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 | |
| 67 | - if (! array_key_exists($innerKey, $target)) { |
|
| 67 | + if (!array_key_exists($innerKey, $target)) { |
|
| 68 | 68 | $target[$innerKey] = []; |
| 69 | 69 | } |
| 70 | 70 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $target = $haystack; |
| 93 | 93 | foreach ($keys as $innerKey) { |
| 94 | - if (! is_array($target) || ! array_key_exists($innerKey, $target)) { |
|
| 94 | + if (!is_array($target) || !array_key_exists($innerKey, $target)) { |
|
| 95 | 95 | return $default; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | $target = &$haystack; |
| 119 | 119 | foreach ($keys as $innerKey) { |
| 120 | - if (! is_array($target)) { |
|
| 120 | + if (!is_array($target)) { |
|
| 121 | 121 | break; |
| 122 | 122 | } |
| 123 | 123 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $target = $haystack; |
| 147 | 147 | foreach ($keys as $innerKey) { |
| 148 | - if (! is_array($target) || ! array_key_exists($innerKey, $target)) { |
|
| 148 | + if (!is_array($target) || !array_key_exists($innerKey, $target)) { |
|
| 149 | 149 | return false; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -49,7 +49,7 @@ discard block |
||
| 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 |
||
| 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 |