| Conditions | 7 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function isOverThreshold(InputInterface $input, OutputInterface $output, ResultAccumulator $report): bool |
||
| 37 | { |
||
| 38 | $maxScore = $report->getMaxScore(); |
||
| 39 | |||
| 40 | if (null === $this->maxScoreThreshold || null === $maxScore || $maxScore <= $this->maxScoreThreshold) { |
||
| 41 | return false; |
||
| 42 | } |
||
| 43 | |||
| 44 | if ('text' === $input->getOption('format') || !empty($input->getOption('output'))) { |
||
| 45 | $output = $output instanceof ConsoleOutputInterface |
||
| 46 | ? $output->getErrorOutput() |
||
| 47 | : $output; |
||
| 48 | $output->writeln('<error>Max score is over the threshold</>'); |
||
| 49 | } |
||
| 50 | |||
| 51 | return true; |
||
| 52 | } |
||
| 54 |