SOAdd   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 19
c 2
b 0
f 0
dl 0
loc 90
ccs 0
cts 22
cp 0
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getSettings() 0 3 1
A withUsername() 0 6 1
A __construct() 0 5 1
A withPassword() 0 6 1
A withSettings() 0 6 1
A getUsername() 0 3 1
A getPassword() 0 3 1
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