Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | abstract class AbstractEvent extends Event |
||
10 | { |
||
11 | public const TYPE_NONE = -1; |
||
12 | public const TYPE_PRE = 0; |
||
13 | public const TYPE_POST = 1; |
||
14 | public const TYPE_PRE_POST = 2; |
||
15 | |||
16 | public function __construct( |
||
17 | protected array $data = [], |
||
18 | protected int $type = self::TYPE_NONE |
||
19 | ) {} |
||
20 | |||
21 | public function getData(): array |
||
22 | { |
||
23 | return $this->data; |
||
24 | } |
||
25 | |||
26 | public function setData(array $data): void |
||
27 | { |
||
28 | $this->data = $data; |
||
29 | } |
||
30 | |||
31 | public function getType(): int |
||
34 | } |
||
35 | } |
||
36 |