| 1 | <?php |
||
| 13 | class ArrayUtility |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Set a node in the array. |
||
| 17 | * |
||
| 18 | * @see http://www.php.net/manual/de/function.array-walk-recursive.php#106340 |
||
| 19 | */ |
||
| 20 | public static function setNodes(array $data, array &$array): void |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Merge the Array Smart. |
||
| 45 | * |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public static function mergeRecursiveDistinct(array &$array1, array &$array2) |
||
| 62 | } |
||
| 63 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.