Event   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 41
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A setId() 0 5 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
}