1 | <?php |
||
26 | class Config |
||
27 | { |
||
28 | /** |
||
29 | * @var array config data |
||
30 | */ |
||
31 | private $config = array(); |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $partialConfig = array(); |
||
37 | |||
38 | /** |
||
39 | * @var ConfigurationLoader |
||
40 | */ |
||
41 | private $loader; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | private $initConfig; |
||
47 | |||
48 | /** |
||
49 | * @var boolean |
||
50 | */ |
||
51 | private $isPharMode; |
||
52 | |||
53 | /** |
||
54 | * @var OutputInterface |
||
55 | */ |
||
56 | private $output; |
||
57 | |||
58 | |||
59 | /** |
||
60 | * Config constructor. |
||
61 | * @param array $initConfig |
||
62 | * @param bool $isPharMode |
||
63 | * @param OutputInterface $output [optional] |
||
|
|||
64 | */ |
||
65 | public function __construct(array $initConfig = array(), $isPharMode = false, OutputInterface $output = null) |
||
71 | |||
72 | /** |
||
73 | * alias magerun command in input from config |
||
74 | * |
||
75 | * @param InputInterface $input |
||
76 | * @return ArgvInput|InputInterface |
||
77 | */ |
||
78 | public function checkConfigCommandAlias(InputInterface $input) |
||
105 | |||
106 | /** |
||
107 | * @param Command $command |
||
108 | */ |
||
109 | public function registerConfigCommandAlias(Command $command) |
||
126 | |||
127 | /** |
||
128 | * @param Application $application |
||
129 | */ |
||
130 | public function registerCustomCommands(Application $application) |
||
146 | |||
147 | /** |
||
148 | * Adds autoloader prefixes from user's config |
||
149 | * |
||
150 | * @param ClassLoader $autoloader |
||
151 | */ |
||
152 | public function registerCustomAutoloaders(ClassLoader $autoloader) |
||
166 | |||
167 | /** |
||
168 | * @param array $config |
||
169 | */ |
||
170 | public function setConfig(array $config) |
||
174 | |||
175 | /** |
||
176 | * @return array |
||
177 | */ |
||
178 | public function getConfig() |
||
182 | |||
183 | /** |
||
184 | * @param ConfigurationLoader $configurationLoader |
||
185 | */ |
||
186 | public function setConfigurationLoader(ConfigurationLoader $configurationLoader) |
||
190 | |||
191 | /** |
||
192 | * @return ConfigurationLoader |
||
193 | */ |
||
194 | public function getLoader() |
||
203 | |||
204 | public function load() |
||
208 | |||
209 | /** |
||
210 | * @param bool $loadExternalConfig |
||
211 | */ |
||
212 | public function loadPartialConfig($loadExternalConfig) |
||
217 | |||
218 | /** |
||
219 | * Get names of sub-folders to be scanned during Magento detection |
||
220 | * @return array |
||
221 | */ |
||
222 | public function getDetectSubFolders() |
||
230 | |||
231 | /** |
||
232 | * @param array $initConfig |
||
233 | * @param bool $isPharMode |
||
234 | * @param OutputInterface $output |
||
235 | * |
||
236 | * @return ConfigurationLoader |
||
237 | */ |
||
238 | public function createLoader(array $initConfig, $isPharMode, OutputInterface $output) |
||
246 | |||
247 | /** |
||
248 | * @param string $message |
||
249 | */ |
||
250 | private function debugWriteln($message) |
||
257 | |||
258 | /** |
||
259 | * Get array from config, default to an empty array if not set |
||
260 | * |
||
261 | * @param string|array $key |
||
262 | * @param array $default [optional] |
||
263 | * @return array |
||
264 | */ |
||
265 | private function getArray($key, $default = array()) |
||
273 | |||
274 | private function traverse(array $keys) |
||
288 | } |
||
289 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.