1 | <?php |
||
11 | class Application extends BaseApplication |
||
12 | { |
||
13 | /** |
||
14 | * @var ConfigurationLoader |
||
15 | */ |
||
16 | protected $configurationLoader; |
||
17 | |||
18 | /** |
||
19 | * @var ExtensionManager |
||
20 | */ |
||
21 | protected $extensionManager; |
||
22 | |||
23 | /** |
||
24 | * @var ContainerBuilder |
||
25 | */ |
||
26 | protected $container; |
||
27 | |||
28 | /** |
||
29 | * @var boolean |
||
30 | */ |
||
31 | protected $ignoreMissingConfiguration; |
||
32 | |||
33 | /** |
||
34 | * @param string $name Application name |
||
35 | * @param string $version Application version |
||
36 | * @param ConfigurationLoader $configurationLoader Configuration loader |
||
37 | * @param ExtensionManager $extensionManager Extension manager |
||
38 | */ |
||
39 | public function __construct($name, $version, ConfigurationLoader $configurationLoader, ExtensionManager $extensionManager) |
||
48 | |||
49 | /** |
||
50 | * @return ContainerInterface The container |
||
51 | */ |
||
52 | public function getContainer() |
||
60 | |||
61 | /** |
||
62 | * Force container to be recreated. |
||
63 | */ |
||
64 | public function destroyContainer() |
||
68 | |||
69 | /** |
||
70 | * Ignore when the configuration file is missing. |
||
71 | * |
||
72 | * Useful for commands which don't need the configurated services |
||
73 | * such as the `init` command. |
||
74 | * |
||
75 | * @param boolean $value |
||
76 | */ |
||
77 | public function ignoreMissingConfiguration($value = true) |
||
81 | |||
82 | /** |
||
83 | * Create a new container. |
||
84 | * |
||
85 | * @return ContainerInterface |
||
86 | */ |
||
87 | protected function createContainer() |
||
118 | } |
||
119 |
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.