Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function getContainer() |
||
|
|||
18 | { |
||
19 | if ($this->container === null) |
||
20 | { |
||
21 | /** @var Application $application */ |
||
22 | $application = $this->getApplication(); |
||
23 | |||
24 | if ($application === null) |
||
25 | { |
||
26 | throw new \LogicException('The container cannot be retrieved as the application instance is not yet set.'); |
||
27 | } |
||
28 | |||
29 | $this->container = $application->getContainer(); |
||
30 | } |
||
31 | |||
32 | return $this->container; |
||
33 | } |
||
34 | } |
||
35 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.