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

Notification   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 57
ccs 0
cts 20
cp 0
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreatedAt() 0 3 1
A getReadAt() 0 3 1
A getContent() 0 3 1
A setContent() 0 5 1
A setCreatedAt() 0 5 1
A getUser() 0 3 1
A setUser() 0 5 1
A setReadAt() 0 5 1
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
}