SOAdd::getSettings()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Spinen\Ncentral\Type;
4
5
6
use Phpro\SoapClient\Type\RequestInterface;
7
8
class SOAdd implements RequestInterface
9
{
10
11
    /**
12
     * @var string
13
     */
14
    private $username;
15
16
    /**
17
     * @var string
18
     */
19
    private $password;
20
21
    /**
22
     * @var \Spinen\Ncentral\Type\EiKeyValue
23
     */
24
    private $settings;
25
26
    /**
27
     * Constructor
28
     *
29
     * @var string $username
30
     * @var string $password
31
     * @var \Spinen\Ncentral\Type\EiKeyValue $settings
32
     */
33
    public function __construct($username, $password, $settings)
34
    {
35
        $this->username = $username;
36
        $this->password = $password;
37
        $this->settings = $settings;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getUsername()
44
    {
45
        return $this->username;
46
    }
47
48
    /**
49
     * @param string $username
50
     * @return SOAdd
51
     */
52
    public function withUsername($username)
53
    {
54
        $new = clone $this;
55
        $new->username = $username;
56
57
        return $new;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getPassword()
64
    {
65
        return $this->password;
66
    }
67
68
    /**
69
     * @param string $password
70
     * @return SOAdd
71
     */
72
    public function withPassword($password)
73
    {
74
        $new = clone $this;
75
        $new->password = $password;
76
77
        return $new;
78
    }
79
80
    /**
81
     * @return \Spinen\Ncentral\Type\EiKeyValue
82
     */
83
    public function getSettings()
84
    {
85
        return $this->settings;
86
    }
87
88
    /**
89
     * @param \Spinen\Ncentral\Type\EiKeyValue $settings
90
     * @return SOAdd
91
     */
92
    public function withSettings($settings)
93
    {
94
        $new = clone $this;
95
        $new->settings = $settings;
96
97
        return $new;
98
    }
99
100
101
}
102
103