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);