ContractsBank   A
last analyzed

Complexity

Total Complexity 21

Size/Duplication

Total Lines 225
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 21
lcom 2
cbo 0
dl 0
loc 225
ccs 0
cts 99
cp 0
rs 10
c 0
b 0
f 0

17 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getID_CondoOwner() 0 4 1
A setID_CondoOwner() 0 5 1
A getDescription() 0 4 1
A setDescription() 0 5 1
A getBeginDateSeason() 0 12 3
A setBeginDateSeason() 0 5 1
A getEndDateSeason() 0 12 3
A setEndDateSeason() 0 5 1
A getInitialBank() 0 4 1
A setInitialBank() 0 5 1
A getPromised() 0 4 1
A setPromised() 0 5 1
A getUsedBank() 0 4 1
A setUsedBank() 0 5 1
A getIsCurrentSeason() 0 4 1
A setIsCurrentSeason() 0 5 1
1
<?php
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class ContractsBank
6
{
7
8
    /**
9
     * @var int $ID_CondoOwner
10
     */
11
    protected $ID_CondoOwner = null;
12
13
    /**
14
     * @var string $Description
15
     */
16
    protected $Description = null;
17
18
    /**
19
     * @var \DateTime $BeginDateSeason
20
     */
21
    protected $BeginDateSeason = null;
22
23
    /**
24
     * @var \DateTime $EndDateSeason
25
     */
26
    protected $EndDateSeason = null;
27
28
    /**
29
     * @var int $InitialBank
30
     */
31
    protected $InitialBank = null;
32
33
    /**
34
     * @var int $Promised
35
     */
36
    protected $Promised = null;
37
38
    /**
39
     * @var int $UsedBank
40
     */
41
    protected $UsedBank = null;
42
43
    /**
44
     * @var boolean $IsCurrentSeason
45
     */
46
    protected $IsCurrentSeason = null;
47
48
    /**
49
     * @param int $ID_CondoOwner
50
     * @param string $Description
51
     * @param \DateTime $BeginDateSeason
52
     * @param \DateTime $EndDateSeason
53
     * @param int $InitialBank
54
     * @param int $Promised
55
     * @param int $UsedBank
56
     * @param boolean $IsCurrentSeason
57
     */
58
    public function __construct($ID_CondoOwner, $Description, \DateTime $BeginDateSeason, \DateTime $EndDateSeason, $InitialBank, $Promised, $UsedBank, $IsCurrentSeason)
59
    {
60
        $this->ID_CondoOwner = $ID_CondoOwner;
61
        $this->Description = $Description;
62
        $this->BeginDateSeason = $BeginDateSeason->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $BeginDateSeason->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $BeginDateSeason.

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...
63
        $this->EndDateSeason = $EndDateSeason->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $EndDateSeason->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $EndDateSeason.

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...
64
        $this->InitialBank = $InitialBank;
65
        $this->Promised = $Promised;
66
        $this->UsedBank = $UsedBank;
67
        $this->IsCurrentSeason = $IsCurrentSeason;
68
    }
69
70
    /**
71
     * @return int
72
     */
73
    public function getID_CondoOwner()
74
    {
75
        return $this->ID_CondoOwner;
76
    }
77
78
    /**
79
     * @param int $ID_CondoOwner
80
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
81
     */
82
    public function setID_CondoOwner($ID_CondoOwner)
83
    {
84
        $this->ID_CondoOwner = $ID_CondoOwner;
85
        return $this;
86
    }
87
88
    /**
89
     * @return string
90
     */
91
    public function getDescription()
92
    {
93
        return $this->Description;
94
    }
95
96
    /**
97
     * @param string $Description
98
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
99
     */
100
    public function setDescription($Description)
101
    {
102
        $this->Description = $Description;
103
        return $this;
104
    }
105
106
    /**
107
     * @return \DateTime
108
     */
109
    public function getBeginDateSeason()
110
    {
111
        if ($this->BeginDateSeason == null) {
112
            return null;
113
        } else {
114
            try {
115
                return new \DateTime($this->BeginDateSeason);
116
            } catch (\Exception $e) {
117
                return false;
118
            }
119
        }
120
    }
121
122
    /**
123
     * @param \DateTime $BeginDateSeason
124
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
125
     */
126
    public function setBeginDateSeason(\DateTime $BeginDateSeason)
127
    {
128
        $this->BeginDateSeason = $BeginDateSeason->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $BeginDateSeason->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $BeginDateSeason.

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...
129
        return $this;
130
    }
131
132
    /**
133
     * @return \DateTime
134
     */
135
    public function getEndDateSeason()
136
    {
137
        if ($this->EndDateSeason == null) {
138
            return null;
139
        } else {
140
            try {
141
                return new \DateTime($this->EndDateSeason);
142
            } catch (\Exception $e) {
143
                return false;
144
            }
145
        }
146
    }
147
148
    /**
149
     * @param \DateTime $EndDateSeason
150
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
151
     */
152
    public function setEndDateSeason(\DateTime $EndDateSeason)
153
    {
154
        $this->EndDateSeason = $EndDateSeason->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $EndDateSeason->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $EndDateSeason.

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...
155
        return $this;
156
    }
157
158
    /**
159
     * @return int
160
     */
161
    public function getInitialBank()
162
    {
163
        return $this->InitialBank;
164
    }
165
166
    /**
167
     * @param int $InitialBank
168
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
169
     */
170
    public function setInitialBank($InitialBank)
171
    {
172
        $this->InitialBank = $InitialBank;
173
        return $this;
174
    }
175
176
    /**
177
     * @return int
178
     */
179
    public function getPromised()
180
    {
181
        return $this->Promised;
182
    }
183
184
    /**
185
     * @param int $Promised
186
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
187
     */
188
    public function setPromised($Promised)
189
    {
190
        $this->Promised = $Promised;
191
        return $this;
192
    }
193
194
    /**
195
     * @return int
196
     */
197
    public function getUsedBank()
198
    {
199
        return $this->UsedBank;
200
    }
201
202
    /**
203
     * @param int $UsedBank
204
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
205
     */
206
    public function setUsedBank($UsedBank)
207
    {
208
        $this->UsedBank = $UsedBank;
209
        return $this;
210
    }
211
212
    /**
213
     * @return boolean
214
     */
215
    public function getIsCurrentSeason()
216
    {
217
        return $this->IsCurrentSeason;
218
    }
219
220
    /**
221
     * @param boolean $IsCurrentSeason
222
     * @return \Gueststream\PMS\IQWare\API\ContractsBank
223
     */
224
    public function setIsCurrentSeason($IsCurrentSeason)
225
    {
226
        $this->IsCurrentSeason = $IsCurrentSeason;
227
        return $this;
228
    }
229
}
230