Passed
Push — master ( fc147e...2e7794 )
by Arnaud
01:10 queued 10s
created

Notification::setOwnerReference()   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
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace JK\NotificationBundle\Entity;
4
5
use Gedmo\Timestampable\Traits\Timestampable;
6
7
class Notification
8
{
9
    use Timestampable;
10
11
    /**
12
     * @var int
13
     */
14
    protected $id;
15
16
    /**
17
     * @var string
18
     */
19
    protected $title;
20
21
    /**
22
     * @var string
23
     */
24
    protected $content;
25
26
    /**
27
     * @var string
28
     */
29
    protected $ownerId;
30
31
    /**
32
     * @var string
33
     */
34
    protected $ownerReference;
35
36
    /**
37
     * @var bool
38
     */
39
    protected $read = false;
40
41
    /**
42
     * @return int
43
     */
44
    public function getId(): int
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * @param int $id
51
     */
52
    public function setId(int $id): void
53
    {
54
        $this->id = $id;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getTitle(): string
61
    {
62
        return $this->title;
63
    }
64
65
    /**
66
     * @param string $title
67
     */
68
    public function setTitle(string $title): void
69
    {
70
        $this->title = $title;
71
    }
72
73
    /**
74
     * @return string
75
     */
76
    public function getContent(): string
77
    {
78
        return $this->content;
79
    }
80
81
    /**
82
     * @param string $content
83
     */
84
    public function setContent(string $content): void
85
    {
86
        $this->content = $content;
87
    }
88
89
    /**
90
     * @return bool
91
     */
92
    public function isRead(): bool
93
    {
94
        return $this->read;
95
    }
96
97
    /**
98
     * @param bool $read
99
     */
100
    public function setRead(bool $read): void
101
    {
102
        $this->read = $read;
103
    }
104
105
    /**
106
     * @return string
107
     */
108
    public function getOwnerId(): string
109
    {
110
        return $this->ownerId;
111
    }
112
113
    /**
114
     * @param string $ownerId
115
     */
116
    public function setOwnerId(string $ownerId): void
117
    {
118
        $this->ownerId = $ownerId;
119
    }
120
121
    public function hasOwnerId(): bool
122
    {
123
        return null !== $this->ownerId;
124
    }
125
126
    /**
127
     * @return string
128
     */
129
    public function getOwnerReference(): string
130
    {
131
        return $this->ownerReference;
132
    }
133
134
    /**
135
     * @param string $ownerReference
136
     */
137
    public function setOwnerReference(string $ownerReference): void
138
    {
139
        $this->ownerReference = $ownerReference;
140
    }
141
}
142