ListenerExceptionEvent::getErrorContract()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FRZB\Component\RequestMapper\Event;
6
7
use FRZB\Component\RequestMapper\Data\ErrorContract;
8
use Symfony\Contracts\EventDispatcher\Event;
9
10
class ListenerExceptionEvent extends Event
11
{
12 6
    public function __construct(
13
        private readonly Event $event,
14
        private readonly \Throwable $exception,
15
        private readonly string $listenerClass,
16
        private readonly ?ErrorContract $errorContract = null,
17
    ) {
18
    }
19
20 1
    public function getEvent(): Event
21
    {
22 1
        return $this->event;
23
    }
24
25 1
    public function getException(): \Throwable
26
    {
27 1
        return $this->exception;
28
    }
29
30 1
    public function getListenerClass(): string
31
    {
32 1
        return $this->listenerClass;
33
    }
34
35 1
    public function getErrorContract(): ?ErrorContract
36
    {
37 1
        return $this->errorContract;
38
    }
39
}
40