Event::addData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 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 function __construct()
20
    {
21
        $this->arguments = func_get_args();
22
    }
23
24
    protected $data = '';
25
26
    /**
27
     * @param $data
28
     */
29
    public function addData($data)
30
    {
31
        $this->data .= $data;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getData(): string
38
    {
39
        return $this->data;
40
    }
41
}
42