VersionInfoGet::__construct()   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 1
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 VersionInfoGet implements RequestInterface
9
{
10
11
    /**
12
     * @var \Spinen\Ncentral\Type\EiCredentials
13
     */
14
    private $credentials;
15
16
    /**
17
     * Constructor
18
     *
19
     * @var \Spinen\Ncentral\Type\EiCredentials $credentials
20
     */
21
    public function __construct($credentials)
22
    {
23
        $this->credentials = $credentials;
24
    }
25
26
    /**
27
     * @return \Spinen\Ncentral\Type\EiCredentials
28
     */
29
    public function getCredentials()
30
    {
31
        return $this->credentials;
32
    }
33
34
    /**
35
     * @param \Spinen\Ncentral\Type\EiCredentials $credentials
36
     * @return VersionInfoGet
37
     */
38
    public function withCredentials($credentials)
39
    {
40
        $new = clone $this;
41
        $new->credentials = $credentials;
42
43
        return $new;
44
    }
45
46
47
}
48
49