IdentityCollection::forType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace Palladium\Entity;
4
5
use Palladium\Component\Collection;
6
use Palladium\Contract\HasId;
7
8
class IdentityCollection extends Collection
9
{
10
11
    private $accountId;
12
    private $parentId;
13
    private $type;
14
    private $status;
15
16
17
    /**
18
     * @codeCoverageIgnore
19
     */
20
    protected function buildEntity(): HasId
21
    {
22
        return new Identity;
23
    }
24
25
26
    /**
27
     * @codeCoverageIgnore
28
     */
29
    public function forAccountId(int $accountId)
30
    {
31
        $this->accountId = $accountId;
32
    }
33
34
35
    /**
36
     * @codeCoverageIgnore
37
     */
38
    public function getAccountId()
39
    {
40
        return $this->accountId;
41
    }
42
43
44
    /**
45
     * @codeCoverageIgnore
46
     */
47
    public function forParentId(int $parentId)
48
    {
49
        $this->parentId = $parentId;
50
    }
51
52
53
    /**
54
     * @codeCoverageIgnore
55
     */
56
    public function getParentId()
57
    {
58
        return $this->parentId;
59
    }
60
61
62
    /**
63
     * @codeCoverageIgnore
64
     */
65
    public function forType(int $type = null)
66
    {
67
        $this->type = $type;
68
    }
69
70
71
    /**
72
     * @codeCoverageIgnore
73
     */
74
    public function getType()
75
    {
76
        return $this->type;
77
    }
78
79
80
    /**
81
     * @codeCoverageIgnore
82
     */
83
    public function forStatus(int $status)
84
    {
85
        $this->status = $status;
86
    }
87
88
89
    /**
90
     * @codeCoverageIgnore
91
     */
92
    public function getStatus()
93
    {
94
        return $this->status;
95
    }
96
}
97