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 ( 5372ed...2e34c8 )
by Jérémiah
47s
created

CompileCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\Command;
4
5
use Overblog\GraphQLBundle\Generator\TypeGenerator;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\Output;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Symfony\Component\Console\Style\SymfonyStyle;
11
12
class CompileCommand extends Command
13
{
14
    private $typeGenerator;
15
16 3
    public function __construct(TypeGenerator $typeGenerator)
17
    {
18 3
        parent::__construct();
19 3
        $this->typeGenerator = $typeGenerator;
20 3
    }
21
22 3
    protected function configure()
23
    {
24
        $this
25 3
            ->setName('graphql:compile')
26 3
            ->setDescription('Generate types manually.')
27
        ;
28 3
    }
29
30 2
    protected function execute(InputInterface $input, OutputInterface $output)
31
    {
32 2
        $output->writeln('<info>Types compilation starts</info>');
33 2
        $classes = $this->typeGenerator->compile(TypeGenerator::MODE_WRITE | TypeGenerator::MODE_OVERRIDE);
34 2
        $output->writeln('<info>Types compilation ends successfully</info>');
35 2
        if ($output->getVerbosity() >= Output::VERBOSITY_VERBOSE) {
36 1
            $io = new SymfonyStyle($input, $output);
37 1
            $io->title('Summary');
38 1
            $rows = [];
39 1
            foreach ($classes as $class => $path) {
40 1
                $rows[] = [$class, $path];
41
            }
42 1
            $io->table(['class', 'path'], $rows);
43
        }
44 2
    }
45
}
46