| Conditions | 7 |
| Paths | 18 |
| Total Lines | 25 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | protected function runSequence(iterable $commands, ContainerInterface $container): int |
||
| 33 | { |
||
| 34 | $errors = 0; |
||
| 35 | foreach ($commands as $sequence) { |
||
| 36 | $sequence->writeHeader($this->output); |
||
| 37 | |||
| 38 | try { |
||
| 39 | $sequence->execute($container, $this->output); |
||
| 40 | $sequence->whiteFooter($this->output); |
||
| 41 | } catch (Throwable $e) { |
||
| 42 | $errors++; |
||
| 43 | $this->sprintf("<error>%s</error>\n", $e); |
||
| 44 | if (!$this->option('ignore') && $this->option('break')) { |
||
| 45 | $this->writeln('<fg=red>Aborting.</fg=red>'); |
||
| 46 | |||
| 47 | return 1; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | $this->writeln(''); |
||
| 52 | } |
||
| 53 | |||
| 54 | $this->writeln('<info>All done!</info>'); |
||
| 55 | |||
| 56 | return ($errors && !$this->option('ignore')) ? 1 : 0; |
||
| 57 | } |
||
| 59 |