AbstractImageEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 8
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTrick() 0 3 1
A __construct() 0 4 1
A getEntity() 0 3 1
1
<?php
2
3
namespace App\Event\Image;
4
5
use App\Entity\AbstractAppEntity;
6
7
use App\Entity\Image;
8
use App\Entity\Trick;
9
use App\Event\AbstractAppEvent;
10
11
abstract class AbstractImageEvent extends AbstractAppEvent
12
{
13
    const NAME = 'user.defineMe';
14
15
    /**
16
     * @var Image
17
     */
18
    protected $entity;
19
20
    /**
21
     * @var Trick
22
     */
23
    protected $trick;
24
25
    public function __construct(Image $image, Trick $trick)
26
    {
27
        $this->entity = $image;
28
        $this->trick = $trick;
29
    }
30
31
    /**
32
     * @return Image
33
     */
34
    public function getEntity(): AbstractAppEntity
35
    {
36
        return $this->entity;
37
    }
38
39
    public function getTrick(): Trick
40
    {
41
        return $this->trick;
42
    }
43
}