Completed
Push — master ( 5e935f...1adcc0 )
by dan
01:52
created

Notification   A

Complexity

Total Complexity 20

Size/Duplication

Total Lines 115
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 20
lcom 1
cbo 0
dl 0
loc 115
rs 10
c 1
b 0
f 0

20 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A getUuid() 0 4 1
A setUuid() 0 4 1
A getNotifiable() 0 4 1
A setNotifiable() 0 4 1
A getType() 0 4 1
A setType() 0 4 1
A getReadAt() 0 4 1
A setReadAt() 0 4 1
A getCreated() 0 4 1
A getUpdated() 0 4 1
A getTitle() 0 4 1
A setTitle() 0 4 1
A getBody() 0 4 1
A setBody() 0 4 1
A updated() 0 5 1
A prePersist() 0 6 1
A markAsRead() 0 4 1
A isRead() 0 4 1
A isUnread() 0 4 1
1
<?php
2
3
4
namespace IrishDan\NotificationBundle\Test\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
use IrishDan\NotificationBundle\Notification\DatabaseNotificationInterface;
8
use IrishDan\NotificationBundle\Notification\NotifiableInterface;
9
10
class Notification implements DatabaseNotificationInterface
11
{
12
    private $id;
13
    private $uuid;
14
    private $notifiable;
15
    private $type;
16
    private $title;
17
    private $body;
18
    private $readAt;
19
    private $created;
20
    private $updated;
21
22
    public function getId()
23
    {
24
        return $this->id;
25
    }
26
27
    public function getUuid()
28
    {
29
        return $this->uuid;
30
    }
31
32
    public function setUuid($uuid)
33
    {
34
        $this->uuid = $uuid;
35
    }
36
37
    public function getNotifiable()
38
    {
39
        return $this->notifiable;
40
    }
41
42
    public function setNotifiable(NotifiableInterface $notifiable)
43
    {
44
        $this->notifiable = $notifiable;
45
    }
46
47
    public function getType()
48
    {
49
        return $this->type;
50
    }
51
52
    public function setType($type)
53
    {
54
        $this->type = $type;
55
    }
56
57
    public function getReadAt()
58
    {
59
        return $this->readAt;
60
    }
61
62
    public function setReadAt(\DateTime $readAt)
63
    {
64
        $this->readAt = $readAt;
65
    }
66
67
    public function getCreated()
68
    {
69
        return $this->created;
70
    }
71
72
    public function getUpdated()
73
    {
74
        return $this->updated;
75
    }
76
77
    public function getTitle()
78
    {
79
        return $this->title;
80
    }
81
82
    public function setTitle($title)
83
    {
84
        $this->title = $title;
85
    }
86
87
    public function getBody()
88
    {
89
        return $this->body;
90
    }
91
92
    public function setBody($body)
93
    {
94
        $this->body = $body;
95
    }
96
97
    public function updated()
98
    {
99
        $updated = new \DateTime();
100
        $this->updated = $updated;
101
    }
102
103
    public function prePersist()
104
    {
105
        $date = new \DateTime();
106
        $this->created = $date;
107
        $this->updated = $date;
108
    }
109
110
    public function markAsRead()
111
    {
112
        // TODO: Implement markAsRead() method.
113
    }
114
115
    public function isRead()
116
    {
117
        // TODO: Implement isRead() method.
118
    }
119
120
    public function isUnread()
121
    {
122
        // TODO: Implement isUnread() method.
123
    }
124
}