1 | <?php |
||
24 | class ConfigFactory |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * Create a new ConfigInterface object from a file. |
||
29 | * |
||
30 | * If a comma-separated list of files is provided, they are checked in sequence until the first one could be loaded |
||
31 | * successfully. |
||
32 | * |
||
33 | * @since 0.3.0 |
||
34 | * |
||
35 | * @param string|array $_ List of files. |
||
36 | * |
||
37 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
|
|||
38 | */ |
||
39 | 1 | public static function createFromFile($_) |
|
63 | |||
64 | /** |
||
65 | * Create a new ConfigInterface object from an array. |
||
66 | * |
||
67 | * @since 0.3.0 |
||
68 | * |
||
69 | * @param array $array Array with configuration values. |
||
70 | * |
||
71 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
72 | */ |
||
73 | 1 | public static function createFromArray(array $array) |
|
77 | |||
78 | /** |
||
79 | * Create a new ConfigInterface object. |
||
80 | * |
||
81 | * Tries to deduce the correct creation method by inspecting the provided arguments. |
||
82 | * |
||
83 | * @since 0.3.0 |
||
84 | * |
||
85 | * @param mixed $_ Array with configuration values. |
||
86 | * |
||
87 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
88 | */ |
||
89 | 3 | public static function create($_) |
|
103 | } |
||
104 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.