Passed
Branch feature/frontend (0b874a)
by Stone
04:52
created

AbstractAppEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getEntity() 0 3 1
1
<?php
2
3
namespace App\Event;
4
5
use App\Entity\AbstractAppEntity;
6
use Symfony\Component\EventDispatcher\Event;
7
8
abstract class AbstractAppEvent extends Event
9
{
10
    const NAME = 'defineMe';
11
12
    /**
13
     * @var AbstractAppEntity
14
     */
15
    protected $entity;
16
17
    public function __construct(AbstractAppEntity $entity)
18
    {
19
        $this->entity = $entity;
20
    }
21
22
    /**
23
     * @return AbstractAppEntity
24
     */
25
    public function getEntity(): AbstractAppEntity
26
    {
27
        return $this->entity;
28
    }
29
}