Member::isConfirmed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Trello\Model;
4
5
use Trello\Exception\InvalidArgumentException;
6
7
/**
8
 * @codeCoverageIgnore
9
 */
10
class Member extends AbstractObject implements MemberInterface
11
{
12
    protected $apiName = 'member';
13
14
    protected $loadParams = array(
15
        'fields' => 'all',
16
    );
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function setAvatarHash($avatarHash)
22
    {
23
        $this->data['avatarHash'] = $avatarHash;
24
25
        return $this;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getAvatarHash()
32
    {
33
        return $this->data['avatarHash'];
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function setBio($bio)
40
    {
41
        $this->data['bio'] = $bio;
42
43
        return $this;
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getBio()
50
    {
51
        return $this->data['bio'];
52
    }
53
54
    /**
55
     * {@inheritdoc}
56
     */
57
    public function getBioData()
58
    {
59
        return $this->data['bioData'];
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function setConfirmed($confirmed)
66
    {
67
        $this->data['confirmed'] = $confirmed;
68
69
        return $this;
70
    }
71
72
    /**
73
     * {@inheritdoc}
74
     */
75
    public function isConfirmed()
76
    {
77
        return $this->data['confirmed'];
78
    }
79
80
    /**
81
     * {@inheritdoc}
82
     */
83
    public function setFullName($fullName)
84
    {
85
        $this->data['fullName'] = $fullName;
86
87
        return $this;
88
    }
89
90
    /**
91
     * {@inheritdoc}
92
     */
93
    public function getFullName()
94
    {
95
        return $this->data['fullName'];
96
    }
97
98
    /**
99
     * {@inheritdoc}
100
     */
101
    public function setIdPremOrgsAdmin(array $idPremOrgsAdmin)
102
    {
103
        $this->data['idPremOrgsAdmin'] = $idPremOrgsAdmin;
104
105
        return $this;
106
    }
107
108
    /**
109
     * {@inheritdoc}
110
     */
111
    public function getIdPremOrgsAdmin()
112
    {
113
        return $this->data['idPremOrgsAdmin'];
114
    }
115
116
    /**
117
     * {@inheritdoc}
118
     */
119
    public function setInitials($initials)
120
    {
121
        $this->data['initials'] = $initials;
122
123
        return $this;
124
    }
125
126
    /**
127
     * {@inheritdoc}
128
     */
129
    public function getInitials()
130
    {
131
        return $this->data['initials'];
132
    }
133
134
    /**
135
     * {@inheritdoc}
136
     */
137
    public function setMemberType($memberType)
138
    {
139
        if (!in_array($memberType, array('admin', 'normal', 'observer'))) {
140
            throw new InvalidArgumentException(sprintf(
141
                'The member type %s does not exist.',
142
                $memberType
143
            ));
144
        }
145
146
        $this->data['memberType'] = $memberType;
147
148
        return $this;
149
    }
150
151
    /**
152
     * {@inheritdoc}
153
     */
154
    public function getMemberType()
155
    {
156
        return $this->data['memberType'];
157
    }
158
159
    /**
160
     * {@inheritdoc}
161
     */
162
    public function setProducts(array $products)
163
    {
164
        $this->data['products'] = $products;
165
166
        return $this;
167
    }
168
169
    /**
170
     * {@inheritdoc}
171
     */
172
    public function getProducts()
173
    {
174
        return $this->data['products'];
175
    }
176
177
    /**
178
     * {@inheritdoc}
179
     */
180
    public function setStatus($status)
181
    {
182
        $this->data['status'] = $status;
183
184
        return $this;
185
    }
186
187
    /**
188
     * {@inheritdoc}
189
     */
190
    public function getStatus()
191
    {
192
        return $this->data['status'];
193
    }
194
195
    /**
196
     * {@inheritdoc}
197
     */
198
    public function setUrl($url)
199
    {
200
        $this->data['url'] = $url;
201
202
        return $this;
203
    }
204
205
    /**
206
     * {@inheritdoc}
207
     */
208
    public function getUrl()
209
    {
210
        return $this->data['url'];
211
    }
212
213
    /**
214
     * {@inheritdoc}
215
     */
216
    public function setUsername($username)
217
    {
218
        $this->data['username'] = $username;
219
220
        return $this;
221
    }
222
223
    /**
224
     * {@inheritdoc}
225
     */
226
    public function getUsername()
227
    {
228
        return $this->data['username'];
229
    }
230
231
    /**
232
     * {@inheritdoc}
233
     */
234
    public function setAvatarSource($avatarSource)
235
    {
236
        $this->data['avatarSource'] = $avatarSource;
237
238
        return $this;
239
    }
240
241
    /**
242
     * {@inheritdoc}
243
     */
244
    public function getAvatarSource()
245
    {
246
        return $this->data['avatarSource'];
247
    }
248
249
    /**
250
     * {@inheritdoc}
251
     */
252
    public function setEmail($email)
253
    {
254
        $this->data['email'] = $email;
255
256
        return $this;
257
    }
258
259
    /**
260
     * {@inheritdoc}
261
     */
262
    public function getEmail()
263
    {
264
        return $this->data['email'];
265
    }
266
267
    /**
268
     * {@inheritdoc}
269
     */
270
    public function setGravatarHash($gravatarHash)
271
    {
272
        $this->data['gravatarHash'] = $gravatarHash;
273
274
        return $this;
275
    }
276
277
    /**
278
     * {@inheritdoc}
279
     */
280
    public function getGravatarHash()
281
    {
282
        return $this->data['gravatarHash'];
283
    }
284
285
    /**
286
     * {@inheritdoc}
287
     */
288
    public function setBoardIds(array $boardIds)
289
    {
290
        $this->data['idBoards'] = $boardIds;
291
292
        return $this;
293
    }
294
295
    /**
296
     * {@inheritdoc}
297
     */
298
    public function getBoardIds()
299
    {
300
        return $this->data['idBoards'];
301
    }
302
303
    /**
304
     * {@inheritdoc}
305
     */
306 View Code Duplication
    public function getBoards()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
307
    {
308
        $boards = array();
309
310
        foreach ($this->data['idBoards'] as $boardId) {
311
            $boards[] = new Board($this->client, $boardId);
312
        }
313
314
        return $boards;
315
    }
316
317
    /**
318
     * {@inheritdoc}
319
     */
320
    public function setPinnedBoardIds(array $pinnedBoardIds)
321
    {
322
        $this->data['idBoardsPinned'] = $pinnedBoardIds;
323
324
        return $this;
325
    }
326
327
    /**
328
     * {@inheritdoc}
329
     */
330
    public function getPinnedBoardIds()
331
    {
332
        return $this->data['idBoardsPinned'];
333
    }
334
335
    /**
336
     * {@inheritdoc}
337
     */
338 View Code Duplication
    public function getPinnedBoards()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
339
    {
340
        $boards = array();
341
342
        foreach ($this->data['idBoardsPinned'] as $boardId) {
343
            $boards[] = new Board($this->client, $boardId);
344
        }
345
346
        return $boards;
347
    }
348
349
    /**
350
     * {@inheritdoc}
351
     */
352
    public function setOrganizationIds(array $organizationIds)
353
    {
354
        $this->data['idOrganizations'] = $organizationIds;
355
356
        return $this;
357
    }
358
359
    /**
360
     * {@inheritdoc}
361
     */
362
    public function getOrganizationIds()
363
    {
364
        return $this->data['idOrganizations'];
365
    }
366
367
    /**
368
     * {@inheritdoc}
369
     */
370
    public function getOrganizations()
371
    {
372
        $organizations = array();
373
374
        foreach ($this->data['idOrganizations'] as $organizationId) {
375
            $organizations[] = new Organization($this->client, $organizationId);
376
        }
377
378
        return $organizations;
379
    }
380
381
    /**
382
     * {@inheritdoc}
383
     */
384
    public function setLoginTypes($loginTypes)
385
    {
386
        $this->data['loginTypes'] = $loginTypes;
387
388
        return $this;
389
    }
390
391
    /**
392
     * {@inheritdoc}
393
     */
394
    public function getLoginTypes()
395
    {
396
        return $this->data['loginTypes'];
397
    }
398
399
    /**
400
     * {@inheritdoc}
401
     */
402
    public function setNewEmail($newEmail)
403
    {
404
        $this->data['newEmail'] = $newEmail;
405
406
        return $this;
407
    }
408
409
    /**
410
     * {@inheritdoc}
411
     */
412
    public function setOneTimeMessagesDismissed(array $messages)
413
    {
414
        $this->data['oneTimeMessagesDismissed'] = $messages;
415
416
        return $this;
417
    }
418
419
    /**
420
     * {@inheritdoc}
421
     */
422
    public function getOneTimeMessagesDismissed()
423
    {
424
        return $this->data['oneTimeMessagesDismissed'];
425
    }
426
427
    /**
428
     * {@inheritdoc}
429
     */
430
    public function setPreferences(array $prefs)
431
    {
432
        $this->data['prefs'] = $prefs;
433
434
        return $this;
435
    }
436
437
    /**
438
     * {@inheritdoc}
439
     */
440
    public function getPreferences()
441
    {
442
        return $this->data['prefs'];
443
    }
444
445
    /**
446
     * {@inheritdoc}
447
     */
448
    public function setTrophies(array $trophies)
449
    {
450
        $this->data['trophies'] = $trophies;
451
452
        return $this;
453
    }
454
455
    /**
456
     * {@inheritdoc}
457
     */
458
    public function getTrophies()
459
    {
460
        return $this->data['trophies'];
461
    }
462
463
    /**
464
     * {@inheritdoc}
465
     */
466
    public function setUploadedAvatarHash($uploadedAvatarHash)
467
    {
468
        $this->data['uploadedAvatarHash'] = $uploadedAvatarHash;
469
470
        return $this;
471
    }
472
473
    /**
474
     * {@inheritdoc}
475
     */
476
    public function getUploadedAvatarHash()
477
    {
478
        return $this->data['uploadedAvatarHash'];
479
    }
480
481
    /**
482
     * {@inheritdoc}
483
     */
484
    public function setPremiumFeatures(array $premiumFeatures)
485
    {
486
        $this->data['premiumFeatures'] = $premiumFeatures;
487
488
        return $this;
489
    }
490
491
    /**
492
     * {@inheritdoc}
493
     */
494
    public function getPremiumFeatures()
495
    {
496
        return $this->data['premiumFeatures'];
497
    }
498
}
499