TemplateEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
namespace Goetas\Twital\EventDispatcher;
3
4
use Goetas\Twital\Template;
5
use Goetas\Twital\Twital;
6
7
/**
8
 *
9
 * @author Asmir Mustafic <[email protected]>
10
 *
11
 */
12
class TemplateEvent extends AbstractEvent
13
{
14
    /**
15
     *
16
     * @var Twital
17
     */
18
    protected $twital;
19
    /**
20
     *
21
     * @var Template
22
     */
23
    protected $template;
24
25
    public function __construct(Twital $twital, Template $template)
26 488
    {
27
        $this->twital = $twital;
28 488
        $this->template = $template;
29 488
    }
30 488
31
    /**
32
     * @return \Goetas\Twital\Twital
33
     */
34
    public function getTwital()
35 1
    {
36
        return $this->twital;
37 1
    }
38
39
    /**
40
     * @return \Goetas\Twital\Template
41
     */
42
    public function getTemplate()
43 488
    {
44
        return $this->template;
45 488
    }
46
47
    /**
48
     * @param \Goetas\Twital\Template $template
49
     * @return void
50
     */
51
    public function setTemplate(Template $template)
52 1
    {
53
        $this->template = $template;
54 1
    }
55
}
56