| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 23 | { |
||
| 24 | /** @var EntityManager $entityManager */ |
||
| 25 | $entityManager = $this->getContainer()->get('doctrine')->getManager(); |
||
| 26 | |||
| 27 | /** @var JobInterface[] $jobs */ |
||
| 28 | $jobs = $entityManager |
||
| 29 | ->getRepository('LoevgaardCronBundle:Job') |
||
| 30 | ->getEnabledJobs() |
||
| 31 | ; |
||
| 32 | |||
| 33 | if (count($jobs)) { |
||
| 34 | $resolver = $this->getContainer()->get('loevgaard_cron.resolver'); |
||
| 35 | $executor = $this->getContainer()->get('loevgaard_cron.executor'); |
||
| 36 | |||
| 37 | $jobs = $resolver->resolve($jobs); |
||
| 38 | $executor->run($jobs); |
||
| 39 | |||
| 40 | $entityManager->flush(); |
||
| 41 | |||
| 42 | while ($executor->isRunning()) { |
||
|
|
|||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
This check looks for
whileloops that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.Consider removing the loop.