Skip to content

Commit d21707b

Browse files
committed
refactor(Helpers): avoid assignment in while condition in dotKeyExists()
1 parent e61b831 commit d21707b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎system/Helpers/Array/ArrayHelper.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ public static function dotKeyExists(string $index, array $array): bool
146146
$currentArray = $array;
147147

148148
// Grab the current index
149-
while (($currentIndex = array_shift($indexes)) !== null) {
149+
while ($indexes !== []) {
150+
$currentIndex = array_shift($indexes);
151+
150152
if ($currentIndex === '*') {
151153
$currentIndex = array_shift($indexes);
152154

0 commit comments

Comments
 (0)