Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class EntityEvent extends AbstractEntityEvent |
||
14 | { |
||
15 | /** |
||
16 | * @var EntityInterface|null |
||
17 | */ |
||
18 | private ?EntityInterface $entity = null; |
||
19 | |||
20 | /** |
||
21 | * @return bool |
||
22 | */ |
||
23 | public function hasEntity(): bool |
||
24 | { |
||
25 | return isset($this->entity); |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @return EntityInterface|null |
||
30 | */ |
||
31 | public function getEntity(): ?EntityInterface |
||
32 | { |
||
33 | return $this->entity; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param EntityInterface|null $entity |
||
38 | */ |
||
39 | public function setEntity(?EntityInterface $entity): void |
||
42 | } |
||
43 | } |
||
44 |