EventArgs::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace CouchDB\Events;
4
5
use Doctrine\Common\EventArgs as BaseEventArgs;
6
7
/**
8
 * @author Markus Bachmann <[email protected]>
9
 */
10
class EventArgs extends BaseEventArgs
11
{
12
    /**
13
     * @var object
14
     */
15
    protected $invoker;
16
17
    /**
18
     * @var mixed
19
     */
20
    protected $data;
21
22 2
    public function __construct($invoker, &$data = null)
23
    {
24 2
        $this->invoker = $invoker;
25 2
        $this->data = $data;
26 2
    }
27
28 1
    public function getData()
29
    {
30 1
        return $this->data;
31
    }
32
33 1
    public function getInvoker()
34
    {
35 1
        return $this->invoker;
36
    }
37
}
38