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 — 0.11 ( 888f0c...0060d3 )
by Jérémiah
18:21
created

ErrorFormattingEvent::getError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 1
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Overblog\GraphQLBundle\Event;
4
5
use GraphQL\Error\Error;
6
use Symfony\Contracts\EventDispatcher\Event;
7
8
// TODO(mcg-web): remove hack after migrating Symfony >= 4.3
9 1
if (EventDispatcherVersionHelper::isForLegacy()) {
10
    final class ErrorFormattingEvent extends \Symfony\Component\EventDispatcher\Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

10
    final class ErrorFormattingEvent extends /** @scrutinizer ignore-deprecated */ \Symfony\Component\EventDispatcher\Event
Loading history...
11
    {
12
        /** @var Error */
13
        private $error;
14
15
        /** @var \ArrayObject */
16
        private $formattedError;
17
18
        public function __construct(Error $error, array $formattedError)
19
        {
20
            $this->error = $error;
21
            $this->formattedError = new \ArrayObject($formattedError);
22
        }
23
24
        public function getError()
25
        {
26
            return $this->error;
27
        }
28
29
        /**
30
         * @return \ArrayObject
31
         */
32
        public function getFormattedError()
33
        {
34
            return $this->formattedError;
35
        }
36
    }
37
} else {
38
    final class ErrorFormattingEvent extends Event
39
    {
40
        /** @var Error */
41
        private $error;
42
43
        /** @var \ArrayObject */
44
        private $formattedError;
45
46 41
        public function __construct(Error $error, array $formattedError)
47
        {
48 41
            $this->error = $error;
49 41
            $this->formattedError = new \ArrayObject($formattedError);
50 41
        }
51
52 30
        public function getError()
53
        {
54 30
            return $this->error;
55
        }
56
57
        /**
58
         * @return \ArrayObject
59
         */
60 33
        public function getFormattedError()
61
        {
62 33
            return $this->formattedError;
63
        }
64
    }
65
}
66