Passed
Push — master ( 786b21...4a8f5f )
by Stone
06:47 queued 42s
created

AppEvent::__construct()   A

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 App\Event;
4
5
use App\Entity\AppEntity;
6
use Symfony\Component\EventDispatcher\Event;
7
8
abstract class AppEvent extends Event
9
{
10
    const NAME = 'defineMe';
11
12
    /**
13
     * @var AppEntity
14
     */
15
    protected $entity;
16
17
    public function __construct(AppEntity $entity)
18
    {
19
        $this->entity = $entity;
20
    }
21
22
    /**
23
     * @return AppEntity
24
     */
25
    public function getEntity(): AppEntity
26
    {
27
        return $this->entity;
28
    }
29
}