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 (#277)
by Jérémiah
22:38 queued 19:05
created

GlobalVariables::has()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\Definition;
4
5
final class GlobalVariables
6
{
7
    /** @var array */
8
    private $services;
9
10 101
    public function __construct(array $services = [])
11
    {
12 101
        $this->services = $services;
13 101
    }
14
15
    /**
16
     * @param string $name
17
     *
18
     * @return mixed
19
     */
20 91
    public function get($name)
21
    {
22 91
        if (!isset($this->services[$name])) {
23 1
            throw new \LogicException(sprintf('Global variable %s could not be located. You should define it.', json_encode($name)));
24
        }
25
26 90
        return $this->services[$name];
27
    }
28
29
    /**
30
     * @param string $name
31
     *
32
     * @return bool
33
     */
34 1
    public function has($name)
35
    {
36 1
        return isset($this->services[$name]);
37
    }
38
}
39