Passed
Push — develop ( 34195e...b04746 )
by Stone
08:36 queued 03:47
created

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