Code Duplication    Length = 38-38 lines in 3 locations

src/TreeHouse/IoBundle/Import/Event/ExceptionEvent.php 1 location

@@ 8-45 (lines=38) @@
5
use Symfony\Component\EventDispatcher\Event;
6
use TreeHouse\IoBundle\Import\Importer\Importer;
7
8
class ExceptionEvent extends Event
9
{
10
    /**
11
     * @var Importer
12
     */
13
    protected $importer;
14
15
    /**
16
     * @var \Exception
17
     */
18
    protected $exception;
19
20
    /**
21
     * @param Importer   $importer
22
     * @param \Exception $exception
23
     */
24
    public function __construct(Importer $importer, \Exception $exception)
25
    {
26
        $this->importer = $importer;
27
        $this->exception = $exception;
28
    }
29
30
    /**
31
     * @return Importer
32
     */
33
    public function getImporter()
34
    {
35
        return $this->importer;
36
    }
37
38
    /**
39
     * @return \Exception
40
     */
41
    public function getException()
42
    {
43
        return $this->exception;
44
    }
45
}
46

src/TreeHouse/IoBundle/Import/Event/ImporterEvent.php 1 location

@@ 9-46 (lines=38) @@
6
use TreeHouse\IoBundle\Entity\ImportPart;
7
use TreeHouse\IoBundle\Import\Importer\Importer;
8
9
class ImporterEvent extends Event
10
{
11
    /**
12
     * @var ImportPart
13
     */
14
    protected $part;
15
16
    /**
17
     * @var Importer
18
     */
19
    protected $importer;
20
21
    /**
22
     * @param ImportPart $part
23
     * @param Importer   $importer
24
     */
25
    public function __construct(ImportPart $part, Importer $importer)
26
    {
27
        $this->part = $part;
28
        $this->importer = $importer;
29
    }
30
31
    /**
32
     * @return ImportPart
33
     */
34
    public function getPart()
35
    {
36
        return $this->part;
37
    }
38
39
    /**
40
     * @return Importer
41
     */
42
    public function getImporter()
43
    {
44
        return $this->importer;
45
    }
46
}
47

src/TreeHouse/IoBundle/Import/Event/ItemEvent.php 1 location

@@ 9-46 (lines=38) @@
6
use TreeHouse\IoBundle\Import\Importer\Importer;
7
use TreeHouse\IoBundle\Item\ItemBag;
8
9
class ItemEvent extends Event
10
{
11
    /**
12
     * @var Importer
13
     */
14
    protected $importer;
15
16
    /**
17
     * @var ItemBag
18
     */
19
    protected $item;
20
21
    /**
22
     * @param Importer $importer The importer where the event originated
23
     * @param ItemBag  $item     The item
24
     */
25
    public function __construct(Importer $importer, ItemBag $item)
26
    {
27
        $this->importer = $importer;
28
        $this->item = $item;
29
    }
30
31
    /**
32
     * @return Importer
33
     */
34
    public function getImporter()
35
    {
36
        return $this->importer;
37
    }
38
39
    /**
40
     * @return ItemBag
41
     */
42
    public function getItem()
43
    {
44
        return $this->item;
45
    }
46
}
47