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

AbstractCommentEvent::__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\AbstractAppEntity;
6
use App\Entity\Comment;
7
use App\Event\AbstractAppEvent;
8
9
abstract class AbstractCommentEvent extends AbstractAppEvent
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(): AbstractAppEntity
27
    {
28
        return $this->entity;
29
    }
30
}