Completed
Branch master (53fdb9)
by Mārtiņš
04:03 queued 01:53
created

IdentityCollection   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 2

Importance

Changes 0
Metric Value
wmc 7
lcom 3
cbo 2
dl 0
loc 70
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A buildEntity() 0 4 1
A forUserId() 0 4 1
A getUserId() 0 4 1
A forType() 0 4 1
A getType() 0 4 1
A forStatus() 0 4 1
A getStatus() 0 4 1
1
<?php
2
3
namespace Palladium\Entity;
4
5
use Palladium\Component\Collection;
6
7
class IdentityCollection extends Collection
8
{
9
10
    private $userId;
11
    private $type;
12
    private $status;
13
14
15
    /**
16
     * @codeCoverageIgnore
17
     */
18
    protected function buildEntity()
19
    {
20
        return new Identity;
21
    }
22
23
24
    /**
25
     * @codeCoverageIgnore
26
     */
27
    public function forUserId($userId)
28
    {
29
        $this->userId = (int) $userId;
30
    }
31
32
33
    /**
34
     * @codeCoverageIgnore
35
     */
36
    public function getUserId()
37
    {
38
        return $this->userId;
39
    }
40
41
42
    /**
43
     * @codeCoverageIgnore
44
     */
45
    public function forType($type)
46
    {
47
        $this->type = (int) $type;
48
    }
49
50
51
    /**
52
     * @codeCoverageIgnore
53
     */
54
    public function getType()
55
    {
56
        return $this->type;
57
    }
58
59
60
    /**
61
     * @codeCoverageIgnore
62
     */
63
    public function forStatus($status)
64
    {
65
        $this->status = (int) $status;
66
    }
67
68
69
    /**
70
     * @codeCoverageIgnore
71
     */
72
    public function getStatus()
73
    {
74
        return $this->status;
75
    }
76
}
77