Comment   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 150
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 150
rs 10
c 0
b 0
f 0
wmc 12

12 Methods

Rating   Name   Duplication   Size   Complexity  
A setCreatedTime() 0 3 1
A getCreatedTime() 0 3 1
A getMessage() 0 3 1
A getUser() 0 3 1
A setUser() 0 3 1
A getTopicId() 0 3 1
A setId() 0 3 1
A setTopicId() 0 3 1
A setReactionsCount() 0 3 1
A getId() 0 3 1
A setMessage() 0 3 1
A getReactionsCount() 0 3 1
1
<?php
2
3
namespace PhpEarth\Stats\Model;
4
5
/**
6
 * Class Comment
7
 * @package PhpEarth\Stats\Model
8
 */
9
class Comment
10
{
11
    /**
12
     * @var int Comment's id
13
     */
14
    private $id;
15
16
    /**
17
     * @var User Comment's author.
18
     */
19
    private $user;
20
21
    /**
22
     * @var string
23
     */
24
    private $createdTime;
25
26
    /**
27
     * @var int
28
     */
29
    private $reactionsCount = 0;
30
31
    /**
32
     * @var string|null
33
     */
34
    private $message = null;
35
36
    /**
37
     * @var int Topic id in which comment was created
38
     */
39
    private $topicId;
40
41
    /**
42
     * Set comment's id.
43
     *
44
     * @param int $id
45
     */
46
    public function setId($id)
47
    {
48
        $this->id = $id;
49
    }
50
51
    /**
52
     * Get comment id.
53
     *
54
     * @return int
55
     */
56
    public function getId()
57
    {
58
        return $this->id;
59
    }
60
61
    /**
62
     * Set comment's author.
63
     *
64
     * @param User $user
65
     */
66
    public function setUser(User $user)
67
    {
68
        $this->user = $user;
69
    }
70
71
    /**
72
     * Get comment's author.
73
     *
74
     * @return User
75
     */
76
    public function getUser()
77
    {
78
        return $this->user;
79
    }
80
81
    /**
82
     * Set comment's created time.
83
     *
84
     * @param string $createdTime
85
     */
86
    public function setCreatedTime($createdTime)
87
    {
88
        $this->createdTime = $createdTime;
89
    }
90
91
    /**
92
     * Get comment's created time.
93
     *
94
     * @return string
95
     */
96
    public function getCreatedTime()
97
    {
98
        return $this->createdTime;
99
    }
100
101
    /**
102
     * Set comment message
103
     *
104
     * @param string $message
105
     */
106
    public function setMessage($message)
107
    {
108
        $this->message = $message;
109
    }
110
111
    /**
112
     * Get comment message.
113
     *
114
     * @return string
115
     */
116
    public function getMessage()
117
    {
118
        return $this->message;
119
    }
120
121
    /**
122
     * Set number of comment's reactions.
123
     *
124
     * @param int $reactionsCount
125
     */
126
    public function setReactionsCount($reactionsCount)
127
    {
128
        $this->reactionsCount = $reactionsCount;
129
    }
130
131
    /**
132
     * Get number of comment's reactions.
133
     *
134
     * @return int
135
     */
136
    public function getReactionsCount()
137
    {
138
        return $this->reactionsCount;
139
    }
140
141
    /**
142
     * Set topic id.
143
     *
144
     * @param int $topicId
145
     */
146
    public function setTopicId($topicId)
147
    {
148
        $this->topicId = $topicId;
149
    }
150
151
    /**
152
     * Get topic id.
153
     *
154
     * @return int
155
     */
156
    public function getTopicId()
157
    {
158
        return $this->topicId;
159
    }
160
}
161