Passed
Push — develop ( a36b57...cb43af )
by Mikaël
48:25 queued 12s
created

Track::getApiKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace ColissimoTracking\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for track StructType
9
 * Meta information extracted from the WSDL
10
 * - type: tns:track
11
 * @subpackage Structs
12
 * @author WsdlToPhp <[email protected]>
13
 */
14
class Track extends AbstractStructBase
15
{
16
    /**
17
     * The accountNumber
18
     * Meta information extracted from the WSDL
19
     * - minOccurs: 0
20
     * @var string
21
     */
22
    public $accountNumber;
23
    /**
24
     * The password
25
     * Meta information extracted from the WSDL
26
     * - minOccurs: 0
27
     * @var string
28
     */
29
    public $password;
30
    /**
31
     * The skybillNumber
32
     * Meta information extracted from the WSDL
33
     * - minOccurs: 0
34
     * @var string
35
     */
36
    public $skybillNumber;
37
    /**
38
     * The apiKey
39
     * Meta information extracted from the WSDL
40
     * - minOccurs: 0
41
     * @var string
42
     */
43
    public $apiKey;
44
    /**
45
     * Constructor method for track
46
     * @uses Track::setAccountNumber()
47
     * @uses Track::setPassword()
48
     * @uses Track::setSkybillNumber()
49
     * @uses Track::setApiKey()
50
     * @param string $accountNumber
51
     * @param string $password
52
     * @param string $skybillNumber
53
     * @param string $apiKey
54
     */
55
    public function __construct($accountNumber = null, $password = null, $skybillNumber = null, $apiKey = null)
56
    {
57
        $this
58
            ->setAccountNumber($accountNumber)
59
            ->setPassword($password)
60
            ->setSkybillNumber($skybillNumber)
61
            ->setApiKey($apiKey);
62
    }
63
    /**
64
     * Get accountNumber value
65
     * @return string|null
66
     */
67
    public function getAccountNumber()
68
    {
69
        return $this->accountNumber;
70
    }
71
    /**
72
     * Set accountNumber value
73
     * @param string $accountNumber
74
     * @return \ColissimoTracking\StructType\Track
75
     */
76
    public function setAccountNumber($accountNumber = null)
77
    {
78
        // validation for constraint: string
79
        if (!is_null($accountNumber) && !is_string($accountNumber)) {
0 ignored issues
show
introduced by
The condition is_string($accountNumber) is always true.
Loading history...
80
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($accountNumber, true), gettype($accountNumber)), __LINE__);
81
        }
82
        $this->accountNumber = $accountNumber;
83
        return $this;
84
    }
85
    /**
86
     * Get password value
87
     * @return string|null
88
     */
89
    public function getPassword()
90
    {
91
        return $this->password;
92
    }
93
    /**
94
     * Set password value
95
     * @param string $password
96
     * @return \ColissimoTracking\StructType\Track
97
     */
98
    public function setPassword($password = null)
99
    {
100
        // validation for constraint: string
101
        if (!is_null($password) && !is_string($password)) {
0 ignored issues
show
introduced by
The condition is_string($password) is always true.
Loading history...
102
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($password, true), gettype($password)), __LINE__);
103
        }
104
        $this->password = $password;
105
        return $this;
106
    }
107
    /**
108
     * Get skybillNumber value
109
     * @return string|null
110
     */
111
    public function getSkybillNumber()
112
    {
113
        return $this->skybillNumber;
114
    }
115
    /**
116
     * Set skybillNumber value
117
     * @param string $skybillNumber
118
     * @return \ColissimoTracking\StructType\Track
119
     */
120
    public function setSkybillNumber($skybillNumber = null)
121
    {
122
        // validation for constraint: string
123
        if (!is_null($skybillNumber) && !is_string($skybillNumber)) {
0 ignored issues
show
introduced by
The condition is_string($skybillNumber) is always true.
Loading history...
124
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($skybillNumber, true), gettype($skybillNumber)), __LINE__);
125
        }
126
        $this->skybillNumber = $skybillNumber;
127
        return $this;
128
    }
129
    /**
130
     * Get apiKey value
131
     * @return string|null
132
     */
133
    public function getApiKey()
134
    {
135
        return $this->apiKey;
136
    }
137
    /**
138
     * Set apiKey value
139
     * @param string $apiKey
140
     * @return \ColissimoTracking\StructType\Track
141
     */
142
    public function setApiKey($apiKey = null)
143
    {
144
        // validation for constraint: string
145
        if (!is_null($apiKey) && !is_string($apiKey)) {
0 ignored issues
show
introduced by
The condition is_string($apiKey) is always true.
Loading history...
146
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($apiKey, true), gettype($apiKey)), __LINE__);
147
        }
148
        $this->apiKey = $apiKey;
149
        return $this;
150
    }
151
}
152