Passed
Push — develop ( 605aab...b17d99 )
by Stone
06:54 queued 11s
created

AbstractVideoEvent   A

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