ThreadEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of Sulu.
5
 *
6
 * (c) MASSIVE ART WebServices GmbH
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Sulu\Bundle\CommentBundle\Events;
13
14
use Sulu\Bundle\CommentBundle\Entity\ThreadInterface;
15
use Symfony\Component\EventDispatcher\Event;
16
17
/**
18
 * Event-arguments for thread events.
19
 */
20
class ThreadEvent extends Event
21
{
22
    /**
23
     * @var ThreadInterface
24
     */
25
    private $thread;
26
27
    /**
28
     * @param ThreadInterface $thread
29
     */
30 6
    public function __construct(ThreadInterface $thread)
31
    {
32 6
        $this->thread = $thread;
33 6
    }
34
35
    /**
36
     * Returns thread.
37
     *
38
     * @return ThreadInterface
39
     */
40 3
    public function getThread()
41
    {
42 3
        return $this->thread;
43
    }
44
}
45