Passed
Push — develop ( b04746...16c6cc )
by Stone
04:31
created

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