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

AppEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

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\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
}