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($_) |
|
71 | |||
72 | /** |
||
73 | * Create a new ConfigInterface object from an array. |
||
74 | * |
||
75 | * @since 0.3.0 |
||
76 | * |
||
77 | * @param array $array Array with configuration values. |
||
78 | * |
||
79 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
80 | */ |
||
81 | 1 | public static function createFromArray(array $array) |
|
91 | |||
92 | /** |
||
93 | * Create a new ConfigInterface object. |
||
94 | * |
||
95 | * Tries to deduce the correct creation method by inspecting the provided arguments. |
||
96 | * |
||
97 | * @since 0.3.0 |
||
98 | * |
||
99 | * @param mixed $_ Array with configuration values. |
||
100 | * |
||
101 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
102 | */ |
||
103 | 3 | public static function create($_) |
|
117 | } |
||
118 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.