Credential::getClientId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Slince shipment tracker library
4
 * @author Tao <[email protected]>
5
 */
6
namespace Slince\ShipmentTracking\DHLECommerce;
7
8
class Credential
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $clientId;
14
15
    /**
16
     * @var string
17
     */
18
    protected $password;
19
20
    public function __construct($clientId, $password)
21
    {
22
        $this->clientId = $clientId;
23
        $this->password = $password;
24
    }
25
26
    /**
27
     * @return mixed
28
     */
29
    public function getClientId()
30
    {
31
        return $this->clientId;
32
    }
33
34
    /**
35
     * @param mixed $clientId
36
     * @return Credential
37
     */
38
    public function setClientId($clientId)
39
    {
40
        $this->clientId = $clientId;
41
        return $this;
42
    }
43
44
    /**
45
     * @return mixed
46
     */
47
    public function getPassword()
48
    {
49
        return $this->password;
50
    }
51
52
    /**
53
     * @param mixed $password
54
     * @return Credential
55
     */
56
    public function setPassword($password)
57
    {
58
        $this->password = $password;
59
        return $this;
60
    }
61
62
    /**
63
     * Converts the credential to an array
64
     * @return array
65
     */
66
    public function toArray()
67
    {
68
        return [
69
            'clientId' => $this->clientId,
70
            'password' => $this->password
71
        ];
72
    }
73
}