FailedItemModificationEvent::getItem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace TreeHouse\Feeder\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Symfony\Component\HttpFoundation\ParameterBag;
7
use TreeHouse\Feeder\Exception\ModificationException;
8
use TreeHouse\Feeder\Modifier\Item\ModifierInterface;
9
10
class FailedItemModificationEvent extends Event
11
{
12
    /**
13
     * @var ParameterBag
14
     */
15
    protected $item;
16
17
    /**
18
     * @var ModifierInterface
19
     */
20
    protected $modifier;
21
22
    /**
23
     * @var ModificationException
24
     */
25
    protected $exception;
26
27
    /**
28
     * @var bool
29
     */
30
    protected $continue = false;
31
32
    /**
33
     * @param ParameterBag          $item
34
     * @param ModifierInterface     $modifier
35
     * @param ModificationException $exception
36
     */
37 8
    public function __construct(ParameterBag $item, ModifierInterface $modifier, ModificationException $exception)
38
    {
39 8
        $this->item = $item;
40 8
        $this->modifier = $modifier;
41 8
        $this->exception = $exception;
42 8
    }
43
44
    /**
45
     * @return ParameterBag
46
     */
47 2
    public function getItem()
48
    {
49 2
        return $this->item;
50
    }
51
52
    /**
53
     * @return ModifierInterface
54
     */
55 2
    public function getModifier()
56
    {
57 2
        return $this->modifier;
58
    }
59
60
    /**
61
     * @return ModificationException
62
     */
63 2
    public function getException()
64
    {
65 2
        return $this->exception;
66
    }
67
68
    /**
69
     * @param bool $bool
70
     */
71 8
    public function setContinue($bool)
72
    {
73 8
        $this->continue = (boolean) $bool;
74 8
    }
75
76
    /**
77
     * @return bool
78
     */
79 8
    public function getContinue()
80
    {
81 8
        return $this->continue;
82
    }
83
}
84