1 | <?php |
||
11 | class Utility{ |
||
|
|||
12 | |||
13 | private function __construct(){} |
||
14 | |||
15 | /** |
||
16 | * Normalizes an array, and converts it to a standard format. |
||
17 | * |
||
18 | * @param array $arr |
||
19 | * @return array normalized array |
||
20 | */ |
||
21 | public static function normalize($arr){ |
||
36 | |||
37 | /** |
||
38 | * returns a string by separating array elements with commas |
||
39 | * |
||
40 | * @param array $arr |
||
41 | * @return array |
||
42 | */ |
||
43 | public static function commas($arr){ |
||
46 | |||
47 | /** |
||
48 | * Merging two arrays |
||
49 | * |
||
50 | * @param mixed $arr1 |
||
51 | * @param mixed $arr2 |
||
52 | * @return array The merged array |
||
53 | * |
||
54 | */ |
||
55 | public static function merge($arr1, $arr2){ |
||
58 | |||
59 | } |
||
60 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.