Meta::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 1
1
<?php
2
/**
3
 * @package narrator
4
 */
5
6
7
namespace Mleko\Narrator;
8
9
10
class Meta
11
{
12
    /** @var object */
13
    private $event;
14
    /** @var string */
15
    private $eventName;
16
    /** @var string */
17
    private $matchedName;
18
    /** @var EventSource */
19
    private $eventSource;
20
21
    /**
22
     * Meta constructor.
23
     * @param object $event
24
     * @param string $eventName
25
     * @param string $matchedName
26
     * @param EventSource $eventSource
27
     */
28 9
    public function __construct($event, $eventName, $matchedName, EventSource $eventSource)
29
    {
30 9
        $this->event = $event;
31 9
        $this->eventName = $eventName;
32 9
        $this->matchedName = $matchedName;
33 9
        $this->eventSource = $eventSource;
34 9
    }
35
36
    /**
37
     * @return object
38
     */
39 1
    public function getEvent()
40
    {
41 1
        return $this->event;
42
    }
43
44
    /**
45
     * @return string
46
     */
47 1
    public function getEventName()
48
    {
49 1
        return $this->eventName;
50
    }
51
52
    /**
53
     * @return string
54
     */
55 4
    public function getMatchedName()
56
    {
57 4
        return $this->matchedName;
58
    }
59
60
    /**
61
     * @return EventSource
62
     */
63 4
    public function getEventSource()
64
    {
65 4
        return $this->eventSource;
66
    }
67
68
    
69
}
70