1 | <?php |
||
18 | trait ExtendedArrayTrait |
||
19 | { |
||
20 | use StringTrait; |
||
21 | |||
22 | /** |
||
23 | * @param array $array |
||
24 | * @param Integer $spaces |
||
25 | * @return string |
||
26 | */ |
||
27 | public function arrayToCommaString(array $array, $spaces) |
||
31 | |||
32 | public function arrayToPairString(array $array) |
||
38 | |||
39 | 3 | /** |
|
40 | * @param $json |
||
41 | * @return array |
||
42 | */ |
||
43 | public static function getArrayUsingJsonNotation($json) |
||
47 | |||
48 | /** |
||
49 | * Get an item from an array using "dot" notation. |
||
50 | * |
||
51 | 2 | * @param array $array |
|
52 | * @param string $key |
||
53 | * @param mixed $default |
||
54 | * |
||
55 | * @return mixed |
||
56 | 2 | */ |
|
57 | 1 | public static function getFromArrayUsingJsonNotation( |
|
79 | |||
80 | /** |
||
81 | * @param array $array |
||
82 | * @param bool|false $key |
||
83 | * @return null |
||
84 | */ |
||
85 | public static function nullIfNotSet(array $array, $key = false) |
||
89 | |||
90 | /** |
||
91 | * @param array $array |
||
92 | * @param bool|false $key |
||
93 | * @return bool |
||
94 | */ |
||
95 | public static function falseIfNotSet(array $array, $key = false) |
||
99 | } |
||
100 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: