ActivityUnitAvail::getID_ActivityUnit()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class ActivityUnitAvail
6
{
7
8
    /**
9
     * @var int $ID_ActivityUnit
10
     */
11
    protected $ID_ActivityUnit = null;
12
13
    /**
14
     * @var \DateTime $aDate
15
     */
16
    protected $aDate = null;
17
18
    /**
19
     * @var TActUnitStatus $Status
20
     */
21
    protected $Status = null;
22
23
    /**
24
     * @var int $ID_Element
25
     */
26
    protected $ID_Element = null;
27
28
    /**
29
     * @var int $nbPersPerElem
30
     */
31
    protected $nbPersPerElem = null;
32
33
    /**
34
     * @var boolean $IsDepDayElem
35
     */
36
    protected $IsDepDayElem = null;
37
38
    /**
39
     * @var float $Amount
40
     */
41
    protected $Amount = null;
42
43
    /**
44
     * @param int $ID_ActivityUnit
45
     * @param \DateTime $aDate
46
     * @param TActUnitStatus $Status
47
     * @param int $ID_Element
48
     * @param int $nbPersPerElem
49
     * @param boolean $IsDepDayElem
50
     * @param float $Amount
51
     */
52
    public function __construct($ID_ActivityUnit, \DateTime $aDate, $Status, $ID_Element, $nbPersPerElem, $IsDepDayElem, $Amount)
53
    {
54
        $this->ID_ActivityUnit = $ID_ActivityUnit;
55
        $this->aDate = $aDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $aDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $aDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
56
        $this->Status = $Status;
57
        $this->ID_Element = $ID_Element;
58
        $this->nbPersPerElem = $nbPersPerElem;
59
        $this->IsDepDayElem = $IsDepDayElem;
60
        $this->Amount = $Amount;
61
    }
62
63
    /**
64
     * @return int
65
     */
66
    public function getID_ActivityUnit()
67
    {
68
        return $this->ID_ActivityUnit;
69
    }
70
71
    /**
72
     * @param int $ID_ActivityUnit
73
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
74
     */
75
    public function setID_ActivityUnit($ID_ActivityUnit)
76
    {
77
        $this->ID_ActivityUnit = $ID_ActivityUnit;
78
        return $this;
79
    }
80
81
    /**
82
     * @return \DateTime
83
     */
84
    public function getADate()
85
    {
86
        if ($this->aDate == null) {
87
            return null;
88
        } else {
89
            try {
90
                return new \DateTime($this->aDate);
91
            } catch (\Exception $e) {
92
                return false;
93
            }
94
        }
95
    }
96
97
    /**
98
     * @param \DateTime $aDate
99
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
100
     */
101
    public function setADate(\DateTime $aDate)
102
    {
103
        $this->aDate = $aDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $aDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $aDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
104
        return $this;
105
    }
106
107
    /**
108
     * @return TActUnitStatus
109
     */
110
    public function getStatus()
111
    {
112
        return $this->Status;
113
    }
114
115
    /**
116
     * @param TActUnitStatus $Status
117
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
118
     */
119
    public function setStatus($Status)
120
    {
121
        $this->Status = $Status;
122
        return $this;
123
    }
124
125
    /**
126
     * @return int
127
     */
128
    public function getID_Element()
129
    {
130
        return $this->ID_Element;
131
    }
132
133
    /**
134
     * @param int $ID_Element
135
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
136
     */
137
    public function setID_Element($ID_Element)
138
    {
139
        $this->ID_Element = $ID_Element;
140
        return $this;
141
    }
142
143
    /**
144
     * @return int
145
     */
146
    public function getNbPersPerElem()
147
    {
148
        return $this->nbPersPerElem;
149
    }
150
151
    /**
152
     * @param int $nbPersPerElem
153
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
154
     */
155
    public function setNbPersPerElem($nbPersPerElem)
156
    {
157
        $this->nbPersPerElem = $nbPersPerElem;
158
        return $this;
159
    }
160
161
    /**
162
     * @return boolean
163
     */
164
    public function getIsDepDayElem()
165
    {
166
        return $this->IsDepDayElem;
167
    }
168
169
    /**
170
     * @param boolean $IsDepDayElem
171
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
172
     */
173
    public function setIsDepDayElem($IsDepDayElem)
174
    {
175
        $this->IsDepDayElem = $IsDepDayElem;
176
        return $this;
177
    }
178
179
    /**
180
     * @return float
181
     */
182
    public function getAmount()
183
    {
184
        return $this->Amount;
185
    }
186
187
    /**
188
     * @param float $Amount
189
     * @return \Gueststream\PMS\IQWare\API\ActivityUnitAvail
190
     */
191
    public function setAmount($Amount)
192
    {
193
        $this->Amount = $Amount;
194
        return $this;
195
    }
196
}
197