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
Pull Request — master (#390)
by
unknown
16:32 queued 14:10
created

ValidateCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
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\Type\Schema;
9
use Overblog\GraphQLBundle\Resolver\TypeResolver;
10
use Symfony\Component\Console\Command\Command;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
14
final class ValidateCommand extends Command
15
{
16
    private $typeResolver;
17
18 1
    public function __construct(TypeResolver $typeResolver)
19
    {
20 1
        parent::__construct();
21 1
        $this->typeResolver = $typeResolver;
22 1
    }
23
24 1
    protected function configure(): void
25
    {
26
        $this
27 1
            ->setName('graphql:validate')
28 1
            ->setDescription('Validate schema')
29
        ;
30 1
    }
31
32 1
    protected function execute(InputInterface $input, OutputInterface $output): void
33
    {
34 1
        $query = $this->typeResolver->resolve('Query');
35 1
        $mutation = null;
36
37 1
        if ($this->typeResolver->hasSolution('Mutation')) {
38
            $mutation = $this->typeResolver->resolve('Mutation');
39
        }
40
41 1
        $schema = @new Schema([
42 1
            'query' => $query,
43 1
            'mutation' => $mutation,
44
        ]);
45
46
        try {
47 1
            $schema->assertValid();
48
        } 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...
49
            $output->writeln($e->getMessage());
50
        }
51 1
        $output->writeln('<info>No error</info>');
52 1
    }
53
}
54