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

Completed
Pull Request — master (#293)
by Jérémiah
24:10
created

RequestExecutorLazyLoaderTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setRequestExecutorFactory() 0 4 1
A getRequestExecutor() 0 8 3
1
<?php
2
3
namespace Overblog\GraphQLBundle\Command;
4
5
use Overblog\GraphQLBundle\Request\Executor as RequestExecutor;
6
7
trait RequestExecutorLazyLoaderTrait
8
{
9
    /** @var RequestExecutor */
10
    private $requestExecutor;
11
12
    /** @var array */
13
    private $requestExecutorFactory;
14
15
    public function setRequestExecutorFactory(array $requestExecutorFactory)
16
    {
17
        $this->requestExecutorFactory = $requestExecutorFactory;
18
    }
19
20
    /**
21
     * @return RequestExecutor
22
     */
23
    protected function getRequestExecutor()
24
    {
25
        if (null === $this->requestExecutor && null !== $this->requestExecutorFactory) {
26
            $this->requestExecutor = call_user_func_array(...$this->requestExecutorFactory);
27
        }
28
29
        return $this->requestExecutor;
30
    }
31
}
32