Total Complexity | 8 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Arr |
||
8 | { |
||
9 | /** |
||
10 | * Get all of the given array except for a specified array of keys. |
||
11 | * |
||
12 | * @param array $array |
||
13 | * @param array|string $keys |
||
14 | * |
||
15 | * @return array |
||
16 | */ |
||
17 | 1190 | public static function except($array, $keys) |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * Get a subset of the items from the given array. |
||
24 | * |
||
25 | * @param array $array |
||
26 | * @param array|string $keys |
||
27 | * |
||
28 | * @return array |
||
29 | */ |
||
30 | 1610 | public static function only($array, $keys) |
|
31 | { |
||
32 | 1610 | return class_exists(BaseArr::class) ? BaseArr::only($array, $keys) : array_only($array, $keys); |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get a value from the array, and remove it. |
||
37 | * |
||
38 | * @param array $array |
||
39 | * @param string $key |
||
40 | * @param mixed $default |
||
41 | * |
||
42 | * @return mixed |
||
43 | */ |
||
44 | 1680 | public static function pull(&$array, $key, $default = null) |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Get an item from an array using "dot" notation. |
||
51 | * |
||
52 | * @param \ArrayAccess|array $array |
||
53 | * @param string|int $key |
||
54 | * @param mixed $default |
||
55 | * |
||
56 | * @return mixed |
||
57 | */ |
||
58 | 2660 | public static function get($array, $key, $default = null) |
|
61 | } |
||
62 | } |
||
63 |