We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.1481 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 1 | protected function execute(InputInterface $input, OutputInterface $output): void |
|
| 41 | { |
||
| 42 | 1 | $schemaName = $input->getOption('schema'); |
|
| 43 | 1 | $schema = $this->getRequestExecutor()->getSchema($schemaName); |
|
| 44 | |||
| 45 | try { |
||
| 46 | 1 | @$schema->assertValid(); |
|
|
|
|||
| 47 | } catch (InvariantViolation $e) { |
||
| 48 | $output->writeln('<comment>'.$e->getMessage().'</comment>'); |
||
| 49 | |||
| 50 | return; |
||
| 51 | } |
||
| 52 | 1 | $output->writeln('<info>No error</info>'); |
|
| 53 | 1 | } |
|
| 54 | } |
||
| 55 |
If you suppress an error, we recommend checking for the error condition explicitly: