| Total Complexity | 6 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Arr |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Get a subset of the items from the given array. |
||
| 11 | * |
||
| 12 | * @param array $array |
||
| 13 | * @param array|string $keys |
||
| 14 | * |
||
| 15 | * @return array |
||
| 16 | */ |
||
| 17 | 190 | public static function only($array, $keys) |
|
| 18 | { |
||
| 19 | 190 | return class_exists(BaseArr::class) ? BaseArr::only($array, $keys) : array_only($array, $keys); |
|
|
|
|||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Get a value from the array, and remove it. |
||
| 24 | * |
||
| 25 | * @param array $array |
||
| 26 | * @param string $key |
||
| 27 | * @param mixed $default |
||
| 28 | * |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | 228 | public static function pull(&$array, $key, $default = null) |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get an item from an array using "dot" notation. |
||
| 38 | * |
||
| 39 | * @param \ArrayAccess|array $array |
||
| 40 | * @param string|int $key |
||
| 41 | * @param mixed $default |
||
| 42 | * |
||
| 43 | * @return mixed |
||
| 44 | */ |
||
| 45 | 646 | public static function get($array, $key, $default = null) |
|
| 48 | } |
||
| 49 | } |
||
| 50 |