ItemEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

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

3 Methods

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