InvalidItemEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getItem() 0 4 1
A getReason() 0 4 1
1
<?php
2
3
namespace TreeHouse\Feeder\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Symfony\Component\HttpFoundation\ParameterBag;
7
8
class InvalidItemEvent extends Event
9
{
10
    /**
11
     * @var ParameterBag
12
     */
13
    protected $item;
14
15
    /**
16
     * @var string
17
     */
18
    protected $reason;
19
20
    /**
21
     * @param ParameterBag $item
22
     * @param string       $reason
23
     */
24 4
    public function __construct(ParameterBag $item, $reason)
25
    {
26 4
        $this->item = $item;
27 4
        $this->reason = $reason;
28 4
    }
29
30
    /**
31
     * @return ParameterBag
32
     */
33 2
    public function getItem()
34
    {
35 2
        return $this->item;
36
    }
37
38
    /**
39
     * @return string
40
     */
41 2
    public function getReason()
42
    {
43 2
        return $this->reason;
44
    }
45
}
46