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
Push — master ( 5ec16c...53ae4d )
by Jérémiah
18:58
created

ErrorFormattingEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Event;
6
7
use GraphQL\Error\Error;
8
use Symfony\Contracts\EventDispatcher\Event;
9
10
// TODO(mcg-web): remove hack after migrjating Symfony >= 4.3
11 1
if (EventDispatcherVersionHelper::isForLegacy()) {
12
    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

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