@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | function none(iterable $items, callable $callback, int $mode = 0): bool |
| 74 | 74 | { |
| 75 | - return ! some($items, $callback, $mode); |
|
| 75 | + return !some($items, $callback, $mode); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | function at_least(int $n, iterable $items, callable $callback, int $mode = CALLBACK_USE_VALUE): bool |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | function has(array $items, ...$keys): bool |
| 178 | 178 | { |
| 179 | - return ! array_diff($keys, array_keys($items)); |
|
| 179 | + return !array_diff($keys, array_keys($items)); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | function only(array $items, ...$keys): array |
@@ -288,8 +288,8 @@ discard block |
||
| 288 | 288 | $keys[] = $iterator->getSubIterator($depth)->key(); |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - if (! empty($separator)) { |
|
| 292 | - $result[join($separator, $keys) ] = $leafValue; |
|
| 291 | + if (!empty($separator)) { |
|
| 292 | + $result[join($separator, $keys)] = $leafValue; |
|
| 293 | 293 | } else { |
| 294 | 294 | $result[] = $leafValue; |
| 295 | 295 | } |
@@ -318,11 +318,11 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | $target = &$haystack; |
| 320 | 320 | foreach ($keys as $innerKey) { |
| 321 | - if (! is_array($target)) { |
|
| 321 | + if (!is_array($target)) { |
|
| 322 | 322 | break; |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - if (! array_key_exists($innerKey, $target)) { |
|
| 325 | + if (!array_key_exists($innerKey, $target)) { |
|
| 326 | 326 | $target[$innerKey] = []; |
| 327 | 327 | } |
| 328 | 328 | |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | |
| 343 | 343 | $target = $haystack; |
| 344 | 344 | foreach ($keys as $innerKey) { |
| 345 | - if (! is_array($target) || ! array_key_exists($innerKey, $target)) { |
|
| 345 | + if (!is_array($target) || !array_key_exists($innerKey, $target)) { |
|
| 346 | 346 | return $default; |
| 347 | 347 | } |
| 348 | 348 | |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | |
| 363 | 363 | $target = &$haystack; |
| 364 | 364 | foreach ($keys as $innerKey) { |
| 365 | - if (! is_array($target)) { |
|
| 365 | + if (!is_array($target)) { |
|
| 366 | 366 | break; |
| 367 | 367 | } |
| 368 | 368 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | $target = $haystack; |
| 386 | 386 | foreach ($keys as $innerKey) { |
| 387 | - if (! is_array($target) || ! array_key_exists($innerKey, $target)) { |
|
| 387 | + if (!is_array($target) || !array_key_exists($innerKey, $target)) { |
|
| 388 | 388 | return false; |
| 389 | 389 | } |
| 390 | 390 | |
@@ -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 | } |