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

CommentEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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
}