Passed
Pull Request — master (#10)
by Alice
02:01
created

TestEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A setEventParam() 0 5 1
A getEventName() 0 3 1
A getEventParam() 0 3 1
1
<?php
2
3
namespace Wonderland\Thread\Example\Simple;
4
5
6
use Wonderland\Thread\Mediator\Event\EventInterface;
7
8
class TestEvent implements EventInterface
9
{
10
    const EVENT_NAME = 'THREAD_TEST';
11
12
    /**
13
     * @var string
14
     */
15
    private $eventParam;
16
17
    /**
18
     * TestEvent constructor.
19
     *
20
     * @param $param
21
     */
22
    public function __construct($param)
23
    {
24
        $this->eventParam = $param;
25
    }
26
27
    /**
28
     * @return mixed
29
     */
30
    public function getEventParam()
31
    {
32
        return $this->eventParam;
33
    }
34
35
    /**
36
     * @param mixed $eventParam
37
     * @return TestEvent
38
     */
39
    public function setEventParam($eventParam)
40
    {
41
        $this->eventParam = $eventParam;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getEventName(): string
50
    {
51
        return self::EVENT_NAME;
52
    }
53
54
55
}