Skip to content

Commit a3d3705

Browse files
committed
spacing
1 parent 2a1748d commit a3d3705

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Arr.php

+5
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,24 @@ public static function forget(&$array, $keys)
1919
{
2020
$original = &$array;
2121
$keys = (array) $keys;
22+
2223
if (count($keys) === 0) {
2324
return;
2425
}
26+
2527
foreach ($keys as $key) {
2628
// if the exact key exists in the top-level, remove it
2729
if (static::exists($array, $key)) {
2830
unset($array[$key]);
31+
2932
continue;
3033
}
3134

3235
$parts = static::explode($key);
3336

3437
// clean up before each pass
3538
$array = &$original;
39+
3640
while (count($parts) > 1) {
3741
$part = array_shift($parts);
3842
if (isset($array[$part]) && is_array($array[$part])) {
@@ -41,6 +45,7 @@ public static function forget(&$array, $keys)
4145
continue 2;
4246
}
4347
}
48+
4449
unset($array[array_shift($parts)]);
4550
}
4651
}

0 commit comments

Comments
 (0)