Total Complexity | 13 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 7 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
4 | final class Arrays |
||
5 | { |
||
6 | public function has($array, $value) |
||
7 | { |
||
8 | if (!is_array($array)) { |
||
9 | return false; |
||
10 | } |
||
11 | return in_array($value, $array); |
||
12 | } |
||
13 | |||
14 | public static function get($array, $key, $defaultValue = false) |
||
15 | { |
||
16 | if (!is_array($array)) { |
||
17 | return $defaultValue; |
||
18 | } |
||
19 | return array_key_exists($key, $array) ? $array[$key] : $defaultValue; |
||
20 | } |
||
21 | |||
22 | public static function isMultidimensional($array = []) |
||
28 | } |
||
29 | |||
30 | public static function nullToEmptyString($array = []) |
||
38 | } |
||
39 | |||
40 | public static function toUrlQueryString($array = []) |
||
52 |