Event::setId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace ConfigToken;
4
5
6
class Event
7
{
8
    const SENDER = 'sender';
9
    const RESULT = 'result';
10
11
    /** @var string */
12
    protected $id;
13
    /** @var array */
14
    public $data;
15
16
    /**
17
     * @param string $id The event id.
18
     */
19 1
    public function __construct($id)
20
    {
21 1
        $this->setId($id);
22 1
        $this->data = array();
23 1
    }
24
25
    /**
26
     * Get the id.
27
     *
28
     * @return string
29
     */
30 1
    public function getId()
31
    {
32 1
        return $this->id;
33
    }
34
35
    /**
36
     * Set the id.
37
     *
38
     * @param string $value The new value.
39
     * @return $this
40
     */
41 1
    public function setId($value)
42
    {
43 1
        $this->id = $value;
44 1
        return $this;
45
    }
46
}