OrganizationTypeAttributeTrait   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 1
dl 0
loc 46
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A internalSetTypeId() 0 4 1
A internalGetTypeId() 0 4 1
A internalSetType() 0 4 1
A internalGetType() 0 4 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/organization/license
6
 * @link       https://www.flipboxfactory.com/software/organization/
7
 */
8
9
namespace flipbox\organizations\objects;
10
11
use flipbox\organizations\records\OrganizationType;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 1.0.0
16
 */
17
trait OrganizationTypeAttributeTrait
18
{
19
    use OrganizationTypeMutatorTrait;
20
21
    /**
22
     * @var OrganizationType|null
23
     */
24
    private $type;
25
26
    /**
27
     * @var int|null
28
     */
29
    private $typeId;
30
31
    /**
32
     * @param int|null $id
33
     */
34
    protected function internalSetTypeId(int $id = null)
35
    {
36
        $this->typeId = $id;
37
    }
38
39
    /**
40
     * @return int|null
41
     */
42
    protected function internalGetTypeId()
43
    {
44
        return $this->typeId;
45
    }
46
47
    /**
48
     * @param OrganizationType|null $type
49
     */
50
    protected function internalSetType(OrganizationType $type = null)
51
    {
52
        $this->type = $type;
53
    }
54
55
    /**
56
     * @return OrganizationType|null
57
     */
58
    protected function internalGetType()
59
    {
60
        return $this->type;
61
    }
62
}
63