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 (#234)
by Jérémiah
07:51
created

CompileCacheWarmer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isOptional() 0 4 1
A warmUp() 0 4 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\CacheWarmer;
4
5
use Overblog\GraphQLBundle\Generator\TypeGenerator;
6
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
7
8
class CompileCacheWarmer implements CacheWarmerInterface
9
{
10
    /** @var TypeGenerator */
11
    private $typeGenerator;
12
13 22
    public function __construct(TypeGenerator $typeGenerator)
14
    {
15 22
        $this->typeGenerator = $typeGenerator;
16 22
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21 22
    public function isOptional()
22
    {
23 22
        return false;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 22
    public function warmUp($cacheDir)
30
    {
31 22
        $this->typeGenerator->compile(TypeGenerator::MODE_WRITE | TypeGenerator::MODE_OVERRIDE);
32 22
    }
33
}
34