Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — master ( 2e3081...e4457c )
by Jérémiah
45s
created

ValidateCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 9
cts 9
cp 1
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Command;
6
7
use GraphQL\Error\InvariantViolation;
8
use GraphQL\Error\Warning;
9
use Symfony\Component\Console\Command\Command;
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Input\InputOption;
12
use Symfony\Component\Console\Output\OutputInterface;
13
14
final class ValidateCommand extends Command
15
{
16
    use RequestExecutorLazyLoaderTrait;
17
18 1
    protected function configure(): void
19
    {
20
        $this
21 1
            ->setName('graphql:validate')
22 1
            ->setDescription('Validate schema')
23 1
            ->addOption(
24 1
                'schema',
25 1
                null,
26 1
                InputOption::VALUE_OPTIONAL,
27 1
                'The schema name to validate.'
28
            )
29
        ;
30 1
    }
31
32 1
    protected function execute(InputInterface $input, OutputInterface $output): void
33
    {
34 1
        Warning::suppress(true);
35
36 1
        $schemaName = $input->getOption('schema');
37 1
        $schema = $this->getRequestExecutor()->getSchema($schemaName);
38
39
        try {
40 1
            $schema->assertValid();
41
        } catch (InvariantViolation $e) {
0 ignored issues
show
Bug introduced by
The class GraphQL\Error\InvariantViolation does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
42
            $output->writeln('<comment>'.$e->getMessage().'</comment>');
43
44
            return;
45
        }
46 1
        $output->writeln('<info>No error</info>');
47 1
    }
48
}
49