| @@ 28-34 (lines=7) @@ | ||
| 25 | } |
|
| 26 | ||
| 27 | $keys = explode('.', $key); |
|
| 28 | while (count($keys) > 0) { |
|
| 29 | $shiftedKey = array_shift($keys); |
|
| 30 | if (!array_key_exists($shiftedKey, $array)) { |
|
| 31 | return $default; |
|
| 32 | } |
|
| 33 | return static::get($array[$shiftedKey], join('.', $keys), $default); |
|
| 34 | } |
|
| 35 | ||
| 36 | return $default; |
|
| 37 | } |
|
| @@ 59-65 (lines=7) @@ | ||
| 56 | } |
|
| 57 | ||
| 58 | $keys = explode('.', $key); |
|
| 59 | while (count($keys) > 0) { |
|
| 60 | $shiftedKey = array_shift($keys); |
|
| 61 | if (!array_key_exists($shiftedKey, $array)) { |
|
| 62 | return false; |
|
| 63 | } |
|
| 64 | return static::has($array[$shiftedKey], join('.', $keys)); |
|
| 65 | } |
|
| 66 | ||
| 67 | return false; |
|
| 68 | } |
|