| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 22 | public static function get($arr, $path, $default = null) |
||
| 23 | { |
||
| 24 | if (!is_array($arr) || !isset($arr)) { |
||
| 25 | throw new \Exception("Argument 1 passed to arr_get must be of the type array"); |
||
| 26 | } |
||
| 27 | $val = $default; |
||
| 28 | self::exploreAtPath($arr, $path, function (&$prosArr) use (&$val) { |
||
| 29 | $val = $prosArr; |
||
| 30 | }); |
||
| 31 | |||
| 32 | return $val ? $val : $default; |
||
| 33 | } |
||
| 34 | |||
| 85 |