Passed
Push — master ( e140d0...d9458c )
by Gabriel
12:38
created

Event::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ByTIC\EventDispatcher\Tests\Fixtures\Events;
4
5
use ByTIC\EventDispatcher\Events\Dispatchable;
6
use ByTIC\EventDispatcher\Events\EventInterface;
7
use ByTIC\EventDispatcher\Events\EventTrait;
8
use Psr\EventDispatcher\StoppableEventInterface;
9
10
/**
11
 * Class Event
12
 * @package ByTIC\EventDispatcher\Tests\Fixtures\Events
13
 */
14
class Event implements EventInterface, StoppableEventInterface
15
{
16
    use EventTrait;
17
    use Dispatchable;
18
19
    public $arguments = [];
20
21
    public function __construct()
22
    {
23
        $this->arguments = func_get_args();
24
    }
25
26
    protected $data = '';
27
28
    /**
29
     * @param $data
30
     */
31
    public function addData($data)
32
    {
33
        $this->data .= $data;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getData(): string
40
    {
41
        return $this->data;
42
    }
43
}
44