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

AbstractAppEvent::__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
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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
}