1 | <?php |
||
16 | final class MultiCodingStandardExtension extends CompilerExtension |
||
17 | { |
||
18 | /** |
||
19 | * @var string[] |
||
20 | */ |
||
21 | private $defaults = [ |
||
22 | 'configPath' => '%appDir%/../multi-cs.json' |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | 4 | public function loadConfiguration() |
|
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | 4 | public function beforeCompile() |
|
41 | |||
42 | 4 | private function loadServicesFromConfig() |
|
48 | |||
49 | 4 | private function loadCommandsToConsoleApplication() |
|
58 | |||
59 | /** |
||
60 | * @param string $type |
||
61 | * |
||
62 | * @return ServiceDefinition |
||
63 | */ |
||
64 | 4 | private function getDefinitionByType($type) |
|
71 | |||
72 | /** |
||
73 | * @param string[] $defaults |
||
74 | */ |
||
75 | 4 | private function setConfigToContainerBuilder(array $defaults) |
|
81 | } |
||
82 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.