Completed
Push — master ( 8d3dbf...7592af )
by Paweł
62:36
created

ContentListEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
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 40
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 getContentList() 0 4 1
A getItem() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Content List Bundle.
7
 *
8
 * Copyright 2017 Sourcefabric z.u. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @copyright 2017 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Bundle\ContentListBundle\Event;
18
19
use SWP\Component\ContentList\Model\ContentListInterface;
20
use SWP\Component\ContentList\Model\ContentListItemInterface;
21
use Symfony\Component\EventDispatcher\Event;
22
23
class ContentListEvent extends Event
24
{
25
    /**
26
     * @var ContentListInterface
27
     */
28
    protected $contentList;
29
30
    /**
31
     * @var ContentListItemInterface
32
     */
33
    protected $item;
34
35
    /**
36
     * ContentListEvent constructor.
37
     *
38
     * @param ContentListInterface     $contentList
39
     * @param ContentListItemInterface $item
40
     */
41 2
    public function __construct(ContentListInterface $contentList, ContentListItemInterface $item)
42
    {
43 2
        $this->contentList = $contentList;
44 2
        $this->item = $item;
45 2
    }
46
47
    /**
48
     * @return ContentListInterface
49
     */
50 2
    public function getContentList(): ContentListInterface
51
    {
52 2
        return $this->contentList;
53
    }
54
55
    /**
56
     * @return ContentListItemInterface
57
     */
58 1
    public function getItem(): ContentListItemInterface
59
    {
60 1
        return $this->item;
61
    }
62
}
63