__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
c 0
b 0
f 0
dl 0
loc 14
rs 9.8666
cc 1
nc 1
nop 11

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
namespace ColissimoPickupPoint\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for findRDVPointRetraitAcheminementByToken StructType
9
 * Meta information extracted from the WSDL
10
 * - type: tns:findRDVPointRetraitAcheminementByToken
11
 * @subpackage Structs
12
 * @author WsdlToPhp <[email protected]>
13
 */
14
class FindRDVPointRetraitAcheminementByToken extends AbstractStructBase
15
{
16
    /**
17
     * The token
18
     * Meta information extracted from the WSDL
19
     * - minOccurs: 0
20
     * @var string
21
     */
22
    public $token;
23
    /**
24
     * The address
25
     * Meta information extracted from the WSDL
26
     * - minOccurs: 0
27
     * @var string
28
     */
29
    public $address;
30
    /**
31
     * The zipCode
32
     * Meta information extracted from the WSDL
33
     * - minOccurs: 0
34
     * @var string
35
     */
36
    public $zipCode;
37
    /**
38
     * The city
39
     * Meta information extracted from the WSDL
40
     * - minOccurs: 0
41
     * @var string
42
     */
43
    public $city;
44
    /**
45
     * The countryCode
46
     * Meta information extracted from the WSDL
47
     * - minOccurs: 0
48
     * @var string
49
     */
50
    public $countryCode;
51
    /**
52
     * The weight
53
     * Meta information extracted from the WSDL
54
     * - minOccurs: 0
55
     * @var string
56
     */
57
    public $weight;
58
    /**
59
     * The shippingDate
60
     * Meta information extracted from the WSDL
61
     * - minOccurs: 0
62
     * @var string
63
     */
64
    public $shippingDate;
65
    /**
66
     * The filterRelay
67
     * Meta information extracted from the WSDL
68
     * - minOccurs: 0
69
     * @var string
70
     */
71
    public $filterRelay;
72
    /**
73
     * The requestId
74
     * Meta information extracted from the WSDL
75
     * - minOccurs: 0
76
     * @var string
77
     */
78
    public $requestId;
79
    /**
80
     * The lang
81
     * Meta information extracted from the WSDL
82
     * - minOccurs: 0
83
     * @var string
84
     */
85
    public $lang;
86
    /**
87
     * The optionInter
88
     * Meta information extracted from the WSDL
89
     * - minOccurs: 0
90
     * @var string
91
     */
92
    public $optionInter;
93
    /**
94
     * Constructor method for findRDVPointRetraitAcheminementByToken
95
     * @uses FindRDVPointRetraitAcheminementByToken::setToken()
96
     * @uses FindRDVPointRetraitAcheminementByToken::setAddress()
97
     * @uses FindRDVPointRetraitAcheminementByToken::setZipCode()
98
     * @uses FindRDVPointRetraitAcheminementByToken::setCity()
99
     * @uses FindRDVPointRetraitAcheminementByToken::setCountryCode()
100
     * @uses FindRDVPointRetraitAcheminementByToken::setWeight()
101
     * @uses FindRDVPointRetraitAcheminementByToken::setShippingDate()
102
     * @uses FindRDVPointRetraitAcheminementByToken::setFilterRelay()
103
     * @uses FindRDVPointRetraitAcheminementByToken::setRequestId()
104
     * @uses FindRDVPointRetraitAcheminementByToken::setLang()
105
     * @uses FindRDVPointRetraitAcheminementByToken::setOptionInter()
106
     * @param string $token
107
     * @param string $address
108
     * @param string $zipCode
109
     * @param string $city
110
     * @param string $countryCode
111
     * @param string $weight
112
     * @param string $shippingDate
113
     * @param string $filterRelay
114
     * @param string $requestId
115
     * @param string $lang
116
     * @param string $optionInter
117
     */
118
    public function __construct($token = null, $address = null, $zipCode = null, $city = null, $countryCode = null, $weight = null, $shippingDate = null, $filterRelay = null, $requestId = null, $lang = null, $optionInter = null)
119
    {
120
        $this
121
            ->setToken($token)
122
            ->setAddress($address)
123
            ->setZipCode($zipCode)
124
            ->setCity($city)
125
            ->setCountryCode($countryCode)
126
            ->setWeight($weight)
127
            ->setShippingDate($shippingDate)
128
            ->setFilterRelay($filterRelay)
129
            ->setRequestId($requestId)
130
            ->setLang($lang)
131
            ->setOptionInter($optionInter);
132
    }
133
    /**
134
     * Get token value
135
     * @return string|null
136
     */
137
    public function getToken()
138
    {
139
        return $this->token;
140
    }
141
    /**
142
     * Set token value
143
     * @param string $token
144
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
145
     */
146
    public function setToken($token = null)
147
    {
148
        // validation for constraint: string
149
        if (!is_null($token) && !is_string($token)) {
0 ignored issues
show
introduced by
The condition is_string($token) is always true.
Loading history...
150
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($token, true), gettype($token)), __LINE__);
151
        }
152
        $this->token = $token;
153
        return $this;
154
    }
155
    /**
156
     * Get address value
157
     * @return string|null
158
     */
159
    public function getAddress()
160
    {
161
        return $this->address;
162
    }
163
    /**
164
     * Set address value
165
     * @param string $address
166
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
167
     */
168
    public function setAddress($address = null)
169
    {
170
        // validation for constraint: string
171
        if (!is_null($address) && !is_string($address)) {
0 ignored issues
show
introduced by
The condition is_string($address) is always true.
Loading history...
172
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($address, true), gettype($address)), __LINE__);
173
        }
174
        $this->address = $address;
175
        return $this;
176
    }
177
    /**
178
     * Get zipCode value
179
     * @return string|null
180
     */
181
    public function getZipCode()
182
    {
183
        return $this->zipCode;
184
    }
185
    /**
186
     * Set zipCode value
187
     * @param string $zipCode
188
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
189
     */
190
    public function setZipCode($zipCode = null)
191
    {
192
        // validation for constraint: string
193
        if (!is_null($zipCode) && !is_string($zipCode)) {
0 ignored issues
show
introduced by
The condition is_string($zipCode) is always true.
Loading history...
194
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($zipCode, true), gettype($zipCode)), __LINE__);
195
        }
196
        $this->zipCode = $zipCode;
197
        return $this;
198
    }
199
    /**
200
     * Get city value
201
     * @return string|null
202
     */
203
    public function getCity()
204
    {
205
        return $this->city;
206
    }
207
    /**
208
     * Set city value
209
     * @param string $city
210
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
211
     */
212
    public function setCity($city = null)
213
    {
214
        // validation for constraint: string
215
        if (!is_null($city) && !is_string($city)) {
0 ignored issues
show
introduced by
The condition is_string($city) is always true.
Loading history...
216
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($city, true), gettype($city)), __LINE__);
217
        }
218
        $this->city = $city;
219
        return $this;
220
    }
221
    /**
222
     * Get countryCode value
223
     * @return string|null
224
     */
225
    public function getCountryCode()
226
    {
227
        return $this->countryCode;
228
    }
229
    /**
230
     * Set countryCode value
231
     * @param string $countryCode
232
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
233
     */
234
    public function setCountryCode($countryCode = null)
235
    {
236
        // validation for constraint: string
237
        if (!is_null($countryCode) && !is_string($countryCode)) {
0 ignored issues
show
introduced by
The condition is_string($countryCode) is always true.
Loading history...
238
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($countryCode, true), gettype($countryCode)), __LINE__);
239
        }
240
        $this->countryCode = $countryCode;
241
        return $this;
242
    }
243
    /**
244
     * Get weight value
245
     * @return string|null
246
     */
247
    public function getWeight()
248
    {
249
        return $this->weight;
250
    }
251
    /**
252
     * Set weight value
253
     * @param string $weight
254
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
255
     */
256
    public function setWeight($weight = null)
257
    {
258
        // validation for constraint: string
259
        if (!is_null($weight) && !is_string($weight)) {
0 ignored issues
show
introduced by
The condition is_string($weight) is always true.
Loading history...
260
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($weight, true), gettype($weight)), __LINE__);
261
        }
262
        $this->weight = $weight;
263
        return $this;
264
    }
265
    /**
266
     * Get shippingDate value
267
     * @return string|null
268
     */
269
    public function getShippingDate()
270
    {
271
        return $this->shippingDate;
272
    }
273
    /**
274
     * Set shippingDate value
275
     * @param string $shippingDate
276
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
277
     */
278
    public function setShippingDate($shippingDate = null)
279
    {
280
        // validation for constraint: string
281
        if (!is_null($shippingDate) && !is_string($shippingDate)) {
0 ignored issues
show
introduced by
The condition is_string($shippingDate) is always true.
Loading history...
282
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($shippingDate, true), gettype($shippingDate)), __LINE__);
283
        }
284
        $this->shippingDate = $shippingDate;
285
        return $this;
286
    }
287
    /**
288
     * Get filterRelay value
289
     * @return string|null
290
     */
291
    public function getFilterRelay()
292
    {
293
        return $this->filterRelay;
294
    }
295
    /**
296
     * Set filterRelay value
297
     * @param string $filterRelay
298
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
299
     */
300
    public function setFilterRelay($filterRelay = null)
301
    {
302
        // validation for constraint: string
303
        if (!is_null($filterRelay) && !is_string($filterRelay)) {
0 ignored issues
show
introduced by
The condition is_string($filterRelay) is always true.
Loading history...
304
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($filterRelay, true), gettype($filterRelay)), __LINE__);
305
        }
306
        $this->filterRelay = $filterRelay;
307
        return $this;
308
    }
309
    /**
310
     * Get requestId value
311
     * @return string|null
312
     */
313
    public function getRequestId()
314
    {
315
        return $this->requestId;
316
    }
317
    /**
318
     * Set requestId value
319
     * @param string $requestId
320
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
321
     */
322
    public function setRequestId($requestId = null)
323
    {
324
        // validation for constraint: string
325
        if (!is_null($requestId) && !is_string($requestId)) {
0 ignored issues
show
introduced by
The condition is_string($requestId) is always true.
Loading history...
326
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($requestId, true), gettype($requestId)), __LINE__);
327
        }
328
        $this->requestId = $requestId;
329
        return $this;
330
    }
331
    /**
332
     * Get lang value
333
     * @return string|null
334
     */
335
    public function getLang()
336
    {
337
        return $this->lang;
338
    }
339
    /**
340
     * Set lang value
341
     * @param string $lang
342
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
343
     */
344
    public function setLang($lang = null)
345
    {
346
        // validation for constraint: string
347
        if (!is_null($lang) && !is_string($lang)) {
0 ignored issues
show
introduced by
The condition is_string($lang) is always true.
Loading history...
348
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lang, true), gettype($lang)), __LINE__);
349
        }
350
        $this->lang = $lang;
351
        return $this;
352
    }
353
    /**
354
     * Get optionInter value
355
     * @return string|null
356
     */
357
    public function getOptionInter()
358
    {
359
        return $this->optionInter;
360
    }
361
    /**
362
     * Set optionInter value
363
     * @param string $optionInter
364
     * @return \ColissimoPickupPoint\StructType\FindRDVPointRetraitAcheminementByToken
365
     */
366
    public function setOptionInter($optionInter = null)
367
    {
368
        // validation for constraint: string
369
        if (!is_null($optionInter) && !is_string($optionInter)) {
0 ignored issues
show
introduced by
The condition is_string($optionInter) is always true.
Loading history...
370
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($optionInter, true), gettype($optionInter)), __LINE__);
371
        }
372
        $this->optionInter = $optionInter;
373
        return $this;
374
    }
375
}
376