| 1 | <?php |
||
| 28 | class Config |
||
| 29 | { |
||
| 30 | /** |
||
| 31 | * @var array config data |
||
| 32 | */ |
||
| 33 | private $config = array(); |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var array |
||
| 37 | */ |
||
| 38 | private $partialConfig = array(); |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var ConfigurationLoader |
||
| 42 | */ |
||
| 43 | private $loader; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @var array |
||
| 47 | */ |
||
| 48 | private $initConfig; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @var boolean |
||
| 52 | */ |
||
| 53 | private $isPharMode; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @var OutputInterface |
||
| 57 | */ |
||
| 58 | private $output; |
||
| 59 | |||
| 60 | |||
| 61 | /** |
||
| 62 | * Config constructor. |
||
| 63 | * |
||
| 64 | * @param array $initConfig |
||
| 65 | * @param bool $isPharMode |
||
| 66 | * @param OutputInterface $output [optional] |
||
|
1 ignored issue
–
show
|
|||
| 67 | */ |
||
| 68 | public function __construct(array $initConfig = array(), $isPharMode = false, OutputInterface $output = null) |
||
| 74 | |||
| 75 | /** |
||
| 76 | * alias magerun command in input from config |
||
| 77 | * |
||
| 78 | * @param InputInterface $input |
||
| 79 | * @return ArgvInput|InputInterface |
||
| 80 | */ |
||
| 81 | public function checkConfigCommandAlias(InputInterface $input) |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @param Command $command |
||
| 111 | */ |
||
| 112 | public function registerConfigCommandAlias(Command $command) |
||
| 129 | |||
| 130 | /** |
||
| 131 | * @param Application $application |
||
| 132 | */ |
||
| 133 | public function registerCustomCommands(Application $application) |
||
| 153 | |||
| 154 | /** |
||
| 155 | * @param string $className |
||
| 156 | * @param string|null $commandName |
||
| 157 | * @return Command |
||
| 158 | * @throws InvalidArgumentException |
||
| 159 | */ |
||
| 160 | private function newCommand($className, $commandName) |
||
| 176 | |||
| 177 | /** |
||
| 178 | * Adds autoloader prefixes from user's config |
||
| 179 | * |
||
| 180 | * @param ClassLoader $autoloader |
||
| 181 | */ |
||
| 182 | public function registerCustomAutoloaders(ClassLoader $autoloader) |
||
| 196 | |||
| 197 | /** |
||
| 198 | * @param array $config |
||
| 199 | */ |
||
| 200 | public function setConfig(array $config) |
||
| 204 | |||
| 205 | /** |
||
| 206 | * @return array |
||
| 207 | */ |
||
| 208 | public function getConfig() |
||
| 212 | |||
| 213 | /** |
||
| 214 | * @param ConfigurationLoader $configurationLoader |
||
| 215 | */ |
||
| 216 | public function setConfigurationLoader(ConfigurationLoader $configurationLoader) |
||
| 220 | |||
| 221 | /** |
||
| 222 | * @return ConfigurationLoader |
||
| 223 | */ |
||
| 224 | public function getLoader() |
||
| 233 | |||
| 234 | public function load() |
||
| 238 | |||
| 239 | /** |
||
| 240 | * @param bool $loadExternalConfig |
||
| 241 | */ |
||
| 242 | public function loadPartialConfig($loadExternalConfig) |
||
| 247 | |||
| 248 | /** |
||
| 249 | * Get names of sub-folders to be scanned during Magento detection |
||
| 250 | * |
||
| 251 | * @return array |
||
| 252 | */ |
||
| 253 | public function getDetectSubFolders() |
||
| 261 | |||
| 262 | /** |
||
| 263 | * @param array $initConfig |
||
| 264 | * @param bool $isPharMode |
||
| 265 | * @param OutputInterface $output |
||
| 266 | * |
||
| 267 | * @return ConfigurationLoader |
||
| 268 | */ |
||
| 269 | public function createLoader(array $initConfig, $isPharMode, OutputInterface $output) |
||
| 277 | |||
| 278 | /** |
||
| 279 | * @param string $message |
||
| 280 | */ |
||
| 281 | private function debugWriteln($message) |
||
| 288 | |||
| 289 | /** |
||
| 290 | * Get array from config, default to an empty array if not set |
||
| 291 | * |
||
| 292 | * @param string|array $key |
||
| 293 | * @param array $default [optional] |
||
| 294 | * @return array |
||
| 295 | */ |
||
| 296 | private function getArray($key, $default = array()) |
||
| 305 | |||
| 306 | private function traverse(array $keys) |
||
| 321 | } |
||
| 322 |
This check looks for
@paramannotations 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.