ListenerExceptionEvent   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 28
ccs 9
cts 9
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getErrorContract() 0 3 1
A getException() 0 3 1
A getListenerClass() 0 3 1
A getEvent() 0 3 1
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