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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 84.21%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 35
ccs 16
cts 19
cp 0.8421
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 13 1
A execute() 0 16 2
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