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

ContentListEvent::getContentList()   A

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
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