Completed
Push — feature/EVO-7278-tracking-info... ( d73a1e...c12eb7 )
by
unknown
66:18
created

AuditTracking::setCollectionId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * document class for GravitonDyn\ActivityLogBundle\Document\ActivityLog
4
 */
5
6
namespace Graviton\AuditTrackingBundle\Document;
7
8
use Doctrine\Common\Collections\ArrayCollection;
9
10
/**
11
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
12
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
13
 * @link     http://swisscom.ch
14
 */
15
class AuditTracking
16
{
17
    /**
18
     * @var mixed $id
19
     */
20
    protected $id;
21
    
22
    /**
23
     * @var string $thread
24
     */
25
    protected $thread;
26
27
    /**
28
     * @var string $username
29
     */
30
    protected $username;
31
32
    /**
33
     * @var string $action
34
     */
35
    protected $action;
36
37
    /**
38
     * @var string $type
39
     */
40
    protected $type;
41
42
    /**
43
     * @var string $location
44
     */
45
    protected $location;
46
47
    /**
48
     * @var ArrayCollection $data
49
     */
50
    protected $data;
51
52
    /**
53
     * @ string $collectionName
54
     */
55
    protected $collectionId;
56
57
    /**
58
     * @ string $collectionName
59
     */
60
    protected $collectionName;
61
62
    /**
63
     * @var \datetime $createdAt
64
     */
65
    protected $createdAt;
66
67
    /**
68
     * constructor
69
     *
70
     * @return self
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
71
     */
72
    public function __construct()
73
    {
74
    }
75
76
    /**
77
     * @return mixed
78
     */
79
    public function getId()
80
    {
81
        return $this->id;
82
    }
83
84
    /**
85
     * @return string
86
     */
87
    public function getThread()
88
    {
89
        return $this->thread;
90
    }
91
92
    /**
93
     * @param string $thread string id to UUID thread for user
94
     * @return void
95
     */
96
    public function setThread($thread)
97
    {
98
        $this->thread = $thread;
99
    }
100
101
    /**
102
     * @return string
103
     */
104
    public function getUsername()
105
    {
106
        return $this->username;
107
    }
108
109
    /**
110
     * @param string $username Current user name
111
     * @return void
112
     */
113
    public function setUsername($username)
114
    {
115
        $this->username = $username;
116
    }
117
118
    /**
119
     * @return string
120
     */
121
    public function getAction()
122
    {
123
        return $this->action;
124
    }
125
126
    /**
127
     * @param string $action what happened
128
     * @return void
129
     */
130
    public function setAction($action)
131
    {
132
        $this->action = $action;
133
    }
134
135
    /**
136
     * @return string
137
     */
138
    public function getType()
139
    {
140
        return $this->type;
141
    }
142
143
    /**
144
     * @param string $type type of event
145
     * @return void
146
     */
147
    public function setType($type)
148
    {
149
        $this->type = $type;
150
    }
151
152
    /**
153
     * @return string
154
     */
155
    public function getLocation()
156
    {
157
        return $this->location;
158
    }
159
160
    /**
161
     * @param string $location where did the action happen
162
     * @return void
163
     */
164
    public function setLocation($location)
165
    {
166
        $this->location = $location;
167
    }
168
169
    /**
170
     * @return object
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use ArrayCollection.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
171
     */
172
    public function getData()
173
    {
174
        return empty($this->data) ? null : $this->data;
175
    }
176
177
    /**
178
     * @param Object $data additional information
179
     * @return void
180
     */
181
    public function setData($data)
182
    {
183
        $this->data = $data;
184
    }
185
186
    /**
187
     * @return mixed
188
     */
189
    public function getCollectionId()
190
    {
191
        return $this->collectionId;
192
    }
193
194
    /**
195
     * @param mixed $collectionId Collection ID
196
     * @return void
197
     */
198
    public function setCollectionId($collectionId)
199
    {
200
        $this->collectionId = $collectionId;
201
    }
202
203
    /**
204
     * @return mixed
205
     */
206
    public function getCollectionName()
207
    {
208
        return $this->collectionName;
209
    }
210
211
    /**
212
     * @param mixed $collectionName Collection name
213
     * @return void
214
     */
215
    public function setCollectionName($collectionName)
216
    {
217
        $this->collectionName = $collectionName;
218
    }
219
220
    /**
221
     * @return \datetime
222
     */
223
    public function getCreatedAt()
224
    {
225
        return $this->createdAt;
226
    }
227
228
    /**
229
     * @param \datetime $createdAt when the event took place
230
     * @return void
231
     */
232
    public function setCreatedAt($createdAt)
233
    {
234
        $this->createdAt = $createdAt;
235
    }
236
}
237