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
19:47 queued 17:35
created

ValidateCommand   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 40
ccs 18
cts 21
cp 0.8571
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configure() 0 7 1
A execute() 0 21 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Command;
6
7
use GraphQL\Type\Schema;
8
use Overblog\GraphQLBundle\Resolver\TypeResolver;
9
use Symfony\Component\Console\Command\Command;
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Output\OutputInterface;
12
13
final class ValidateCommand extends Command
14
{
15
    private $typeResolver;
16
17 1
    public function __construct(TypeResolver $typeResolver)
18
    {
19 1
        parent::__construct();
20 1
        $this->typeResolver = $typeResolver;
21 1
    }
22
23 1
    protected function configure(): void
24
    {
25
        $this
26 1
            ->setName('graphql:validate')
27 1
            ->setDescription('Validate schema')
28
        ;
29 1
    }
30
31 1
    protected function execute(InputInterface $input, OutputInterface $output): void
32
    {
33 1
        $query = $this->typeResolver->resolve('Query');
34 1
        $mutation = null;
35
36 1
        if ($this->typeResolver->hasSolution('Mutation')) {
37
            $mutation = $this->typeResolver->resolve('Mutation');
38
        }
39
40 1
        $schema = @new Schema([
41 1
            'query' => $query,
42 1
            'mutation' => $mutation,
43
        ]);
44
45
        try {
46 1
            $schema->assertValid();
47
        } catch (GraphQL\Error\InvariantViolation $e) {
0 ignored issues
show
Bug introduced by
The class Overblog\GraphQLBundle\C...rror\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...
48
            $output->writeln($e->getMessage());
49
        }
50 1
        $output->writeln('<info>No error</info>');
51 1
    }
52
}
53