1 | <?php |
||
24 | class ConfigFactory |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * Cached contents of the config files. |
||
29 | * |
||
30 | * @since 0.4.3 |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected static $configFilesCache = []; |
||
35 | |||
36 | /** |
||
37 | * Create a new ConfigInterface object from a file. |
||
38 | * |
||
39 | * If a comma-separated list of files is provided, they are checked in sequence until the first one could be loaded |
||
40 | * successfully. |
||
41 | * |
||
42 | * @since 0.3.0 |
||
43 | * |
||
44 | * @param string|array $_ List of files. |
||
45 | * |
||
46 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
|
|||
47 | */ |
||
48 | 2 | public static function createFromFile($_) |
|
84 | |||
85 | /** |
||
86 | * Create a new ConfigInterface object from an array. |
||
87 | * |
||
88 | * @since 0.3.0 |
||
89 | * |
||
90 | * @param array $array Array with configuration values. |
||
91 | * |
||
92 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
93 | */ |
||
94 | 2 | public static function createFromArray(array $array) |
|
104 | |||
105 | /** |
||
106 | * Create a new ConfigInterface object. |
||
107 | * |
||
108 | * Tries to deduce the correct creation method by inspecting the provided arguments. |
||
109 | * |
||
110 | * @since 0.3.0 |
||
111 | * |
||
112 | * @param mixed $_ Array with configuration values. |
||
113 | * |
||
114 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
||
115 | */ |
||
116 | 4 | public static function create($_) |
|
130 | } |
||
131 |
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.