NotificationEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 37
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getOwnerId() 0 3 1
A getTitle() 0 3 1
A getContent() 0 3 1
1
<?php
2
3
namespace JK\NotificationBundle\Event;
4
5
use Symfony\Contracts\EventDispatcher\Event;
6
7
class NotificationEvent extends Event
8
{
9
    /**
10
     * @var string
11
     */
12
    private $title;
13
14
    /**
15
     * @var string
16
     */
17
    private $content;
18
19
    /**
20
     * @var string
21
     */
22
    private $ownerId;
23
24
    public function __construct(string $title, string $content, string $ownerId = null)
25
    {
26
        $this->title = $title;
27
        $this->content = $content;
28
        $this->ownerId = $ownerId;
29
    }
30
31
    public function getTitle(): string
32
    {
33
        return $this->title;
34
    }
35
36
    public function getContent(): string
37
    {
38
        return $this->content;
39
    }
40
41
    public function getOwnerId(): string
42
    {
43
        return $this->ownerId;
44
    }
45
}
46