Passed
Push — master ( 7b861e...277b50 )
by Andrey
04:52
created

AddressSettlementProperty::filterRef()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace Daaner\NovaPoshta\Traits;
4
5
trait AddressSettlementProperty
6
{
7
    protected $AreaRef;
8
    protected $RegionRef;
9
    protected $Ref;
10
    protected $Warehouse = false;
11
12
13
    /**
14
     * @param string $AreaRef
15
     * @return this
16
     */
17
    public function filterAreaRef($AreaRef)
18
    {
19
        $this->AreaRef = $AreaRef;
20
21
        return $this;
22
    }
23
24
    /**
25
     * @return this
26
     */
27
    public function getAreaRef()
28
    {
29
        if ($this->AreaRef) {
30
            $this->methodProperties['AreaRef'] = $this->AreaRef;
1 ignored issue
show
Bug Best Practice introduced by
The property methodProperties does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
31
        }
32
33
        return $this;
34
    }
35
36
    /**
37
     * @param string $RegionRef
38
     * @return this
39
     */
40
    public function filterRegionRef($RegionRef)
41
    {
42
        $this->RegionRef = $RegionRef;
43
44
        return $this;
45
    }
46
47
    /**
48
     * @return this
49
     */
50
    public function getRegionRef()
51
    {
52
        if ($this->RegionRef) {
53
            $this->methodProperties['RegionRef'] = $this->RegionRef;
1 ignored issue
show
Bug Best Practice introduced by
The property methodProperties does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
54
        }
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return this
61
     */
62
    public function filterWarehouse()
63
    {
64
        $this->Warehouse = true;
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return this
71
     */
72
    public function getWarehouse()
73
    {
74
        if ($this->Warehouse) {
75
            $this->methodProperties['Warehouse'] = 1;
1 ignored issue
show
Bug Best Practice introduced by
The property methodProperties does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
76
        }
77
78
        return $this;
79
    }
80
81
    /**
82
     * @param string $ref
83
     * @return this
84
     */
85
    public function filterRef($ref)
86
    {
87
        $this->Ref = $ref;
88
89
        return $this;
90
    }
91
92
    /**
93
     * @return this
94
     */
95
    public function getRef()
96
    {
97
        if ($this->Ref) {
98
            $this->methodProperties['Ref'] = $this->Ref;
1 ignored issue
show
Bug Best Practice introduced by
The property methodProperties does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
99
        }
100
101
        return $this;
102
    }
103
104
}
105