Completed
Push — master ( bac1bc...5acb47 )
by Ivo
07:35
created

FaultEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 61.11%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 53
ccs 11
cts 18
cp 0.6111
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getId() 0 4 1
A getException() 0 4 1
A getRequestEvent() 0 4 1
1
<?php
2
3
namespace Freshcells\SoapClientBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
class FaultEvent extends Event
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $id;
13
    /**
14
     * @var \Exception
15
     */
16
    protected $exception;
17
18
    /**
19
     * @var RequestEvent
20
     */
21
    protected $requestEvent;
22
23
    /**
24
     * FaultEvent constructor.
25
     * @param string $id
26
     * @param \Exception $exception
27
     * @param RequestEvent $requestEvent
28
     */
29 2
    public function __construct(string $id, \Exception $exception, RequestEvent $requestEvent)
30
    {
31 2
        $this->id           = $id;
32 2
        $this->exception    = $exception;
33 2
        $this->requestEvent = $requestEvent;
34 2
    }
35
36
    /**
37
     * @return string
38
     */
39 2
    public function getId(): string
40
    {
41 2
        return $this->id;
42
    }
43
44
    /**
45
     * @return \Exception
46
     */
47 2
    public function getException(): \Exception
48
    {
49 2
        return $this->exception;
50
    }
51
52
    /**
53
     * @return RequestEvent
54
     */
55 2
    public function getRequestEvent(): RequestEvent
56
    {
57 2
        return $this->requestEvent;
58
    }
59
}
60