Completed
Push — master ( 1e7ae1...1641c1 )
by Axel
04:29
created

Notification::setContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Model\User;
4
5
use Symfony\Component\Security\Core\User\UserInterface;
6
7
abstract class Notification
8
{
9
    /** @var UserInterface **/
10
    protected $user;
11
    /** @var string **/
12
    protected $content;
13
    /** @var \DateTime **/
14
    protected $createdAt;
15
    /** @var \DateTime **/
16
    protected $readAt;
17
    
18
    public function setUser(UserInterface $user): Notification
19
    {
20
        $this->user = $user;
21
        
22
        return $this;
23
    }
24
    
25
    public function getUser(): UserInterface
26
    {
27
        return $this->user;
28
    }
29
    
30
    public function setContent(string $content): Notification
31
    {
32
        $this->content = $content;
33
        
34
        return $this;
35
    }
36
    
37
    public function getContent(): string
38
    {
39
        return $this->content;
40
    }
41
    
42
    public function setCreatedAt(\DateTime $createdAt): Notification
43
    {
44
        $this->createdAt = $createdAt;
45
        
46
        return $this;
47
    }
48
    
49
    public function getCreatedAt(): \DateTime
50
    {
51
        return $this->createdAt;
52
    }
53
    
54
    public function setReadAt(\DateTime $readAt): Notification
55
    {
56
        $this->readAt = $readAt;
57
        
58
        return $this;
59
    }
60
    
61
    public function getReadAt(): ?\DateTime
62
    {
63
        return $this->readAt;
64
    }
65
}