PointRetraitAcheminementByIDResult   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 98
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 12
eloc 21
c 1
b 0
f 0
dl 0
loc 98
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A setPointRetraitAcheminement() 0 4 1
A setErrorCode() 0 8 4
A getErrorMessage() 0 3 1
A getErrorCode() 0 3 1
A __construct() 0 6 1
A getPointRetraitAcheminement() 0 3 1
A setErrorMessage() 0 8 3
1
<?php
2
3
namespace ColissimoPickupPoint\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for pointRetraitAcheminementByIDResult StructType
9
 * @subpackage Structs
10
 * @author WsdlToPhp <[email protected]>
11
 */
12
class PointRetraitAcheminementByIDResult extends AbstractStructBase
13
{
14
    /**
15
     * The errorCode
16
     * @var int
17
     */
18
    public $errorCode;
19
    /**
20
     * The errorMessage
21
     * Meta information extracted from the WSDL
22
     * - minOccurs: 0
23
     * @var string
24
     */
25
    public $errorMessage;
26
    /**
27
     * The pointRetraitAcheminement
28
     * Meta information extracted from the WSDL
29
     * - minOccurs: 0
30
     * @var \ColissimoPickupPoint\StructType\PointRetraitAcheminement
31
     */
32
    public $pointRetraitAcheminement;
33
    /**
34
     * Constructor method for pointRetraitAcheminementByIDResult
35
     * @uses PointRetraitAcheminementByIDResult::setErrorCode()
36
     * @uses PointRetraitAcheminementByIDResult::setErrorMessage()
37
     * @uses PointRetraitAcheminementByIDResult::setPointRetraitAcheminement()
38
     * @param int $errorCode
39
     * @param string $errorMessage
40
     * @param \ColissimoPickupPoint\StructType\PointRetraitAcheminement $pointRetraitAcheminement
41
     */
42
    public function __construct($errorCode = null, $errorMessage = null, \ColissimoPickupPoint\StructType\PointRetraitAcheminement $pointRetraitAcheminement = null)
43
    {
44
        $this
45
            ->setErrorCode($errorCode)
46
            ->setErrorMessage($errorMessage)
47
            ->setPointRetraitAcheminement($pointRetraitAcheminement);
48
    }
49
    /**
50
     * Get errorCode value
51
     * @return int|null
52
     */
53
    public function getErrorCode()
54
    {
55
        return $this->errorCode;
56
    }
57
    /**
58
     * Set errorCode value
59
     * @param int $errorCode
60
     * @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementByIDResult
61
     */
62
    public function setErrorCode($errorCode = null)
63
    {
64
        // validation for constraint: int
65
        if (!is_null($errorCode) && !(is_int($errorCode) || ctype_digit($errorCode))) {
0 ignored issues
show
introduced by
The condition is_int($errorCode) is always true.
Loading history...
66
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($errorCode, true), gettype($errorCode)), __LINE__);
67
        }
68
        $this->errorCode = $errorCode;
69
        return $this;
70
    }
71
    /**
72
     * Get errorMessage value
73
     * @return string|null
74
     */
75
    public function getErrorMessage()
76
    {
77
        return $this->errorMessage;
78
    }
79
    /**
80
     * Set errorMessage value
81
     * @param string $errorMessage
82
     * @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementByIDResult
83
     */
84
    public function setErrorMessage($errorMessage = null)
85
    {
86
        // validation for constraint: string
87
        if (!is_null($errorMessage) && !is_string($errorMessage)) {
0 ignored issues
show
introduced by
The condition is_string($errorMessage) is always true.
Loading history...
88
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorMessage, true), gettype($errorMessage)), __LINE__);
89
        }
90
        $this->errorMessage = $errorMessage;
91
        return $this;
92
    }
93
    /**
94
     * Get pointRetraitAcheminement value
95
     * @return \ColissimoPickupPoint\StructType\PointRetraitAcheminement|null
96
     */
97
    public function getPointRetraitAcheminement()
98
    {
99
        return $this->pointRetraitAcheminement;
100
    }
101
    /**
102
     * Set pointRetraitAcheminement value
103
     * @param \ColissimoPickupPoint\StructType\PointRetraitAcheminement $pointRetraitAcheminement
104
     * @return \ColissimoPickupPoint\StructType\PointRetraitAcheminementByIDResult
105
     */
106
    public function setPointRetraitAcheminement(\ColissimoPickupPoint\StructType\PointRetraitAcheminement $pointRetraitAcheminement = null)
107
    {
108
        $this->pointRetraitAcheminement = $pointRetraitAcheminement;
109
        return $this;
110
    }
111
}
112