Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
71 | protected function fillTasks() |
||
72 | { |
||
73 | $description = new ApplicationDescription($this->getApplication()); |
||
|
|||
74 | foreach ($description->getCommands() as $command) { |
||
75 | if ($command instanceof NightlyCommandInterface) { |
||
76 | $this->taskBag->addTask($command, $command->getPriority()); |
||
77 | } |
||
78 | } |
||
79 | } |
||
80 | } |
||
81 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: