Completed
Push — master ( 9c0667...3631d5 )
by Jeroen
8s
created

HandledItemEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 6
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
1
<?php
2
3
namespace TreeHouse\IoBundle\Import\Event;
4
5
use TreeHouse\IoBundle\Import\Feed\FeedItemBag;
6
use TreeHouse\IoBundle\Import\Importer\Importer;
7
use TreeHouse\IoBundle\Model\SourceInterface;
8
9 View Code Duplication
class HandledItemEvent extends ItemEvent
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    /**
12
     * @var SourceInterface
13
     */
14
    protected $source;
15
16
    /**
17
     * @param Importer        $importer
18
     * @param FeedItemBag     $item
19
     * @param SourceInterface $source
20
     */
21
    public function __construct(Importer $importer, FeedItemBag $item, SourceInterface $source)
22
    {
23
        parent::__construct($importer, $item);
24
25
        $this->source = $source;
26
    }
27
28
    /**
29
     * @param SourceInterface $source The result
30
     */
31
    public function setSource($source)
32
    {
33
        $this->source = $source;
34
    }
35
36
    /**
37
     * @return SourceInterface
38
     */
39
    public function getSource()
40
    {
41
        return $this->source;
42
    }
43
}
44