Skip to content

Commit 0ecd1c1

Browse files
committed
- removes a redundant check
1 parent a4c0614 commit 0ecd1c1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

ArrayDataFilterTrait.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use function array_key_exists;
1515
use function explode;
16-
use function is_array;
1716
use function str_replace;
1817
use function str_starts_with;
1918
use function strtolower;
@@ -43,9 +42,7 @@ public function find(string $index, mixed $default = null): mixed
4342
}
4443
$data = $this->data;
4544
foreach (explode('.', $index) as $token) {
46-
if (false === is_array($data) ||
47-
false === array_key_exists($token, $data)
48-
) {
45+
if (false === array_key_exists($token, $data)) {
4946
return $default;
5047
}
5148
$data =& $data[$token];

0 commit comments

Comments
 (0)