Passed
Branch feature/frontend (0b874a)
by Stone
04:52
created

AbstractUserEvent   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 getEntity() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Event\User;
4
5
use App\Entity\AbstractAppEntity;
6
use App\Entity\User;
7
use App\Event\AbstractAppEvent;
8
9
abstract class AbstractUserEvent extends AbstractAppEvent
10
{
11
    const NAME = 'user.defineMe';
12
13
    /**
14
     * @var User
15
     */
16
    protected $entity;
17
18
    public function __construct(User $user)
19
    {
20
        $this->entity = $user;
21
    }
22
23
    /**
24
     * @return User
25
     */
26
    public function getEntity(): AbstractAppEntity
27
    {
28
        return $this->entity;
29
    }
30
}