GoogleEval::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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

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...
52
        $this->StayLength = $StayLength;
53
        $this->DayCount = $DayCount;
54
    }
55
56
    /**
57
     * @return int
58
     */
59
    public function getIntGUID()
60
    {
61
        return $this->intGUID;
62
    }
63
64
    /**
65
     * @param int $intGUID
66
     * @return \Gueststream\PMS\IQWare\API\GoogleEval
67
     */
68
    public function setIntGUID($intGUID)
69
    {
70
        $this->intGUID = $intGUID;
71
        return $this;
72
    }
73
74
    /**
75
     * @return string
76
     */
77
    public function getRateCodes()
78
    {
79
        return $this->RateCodes;
80
    }
81
82
    /**
83
     * @param string $RateCodes
84
     * @return \Gueststream\PMS\IQWare\API\GoogleEval
85
     */
86
    public function setRateCodes($RateCodes)
87
    {
88
        $this->RateCodes = $RateCodes;
89
        return $this;
90
    }
91
92
    /**
93
     * @return string
94
     */
95
    public function getRoomTypes()
96
    {
97
        return $this->RoomTypes;
98
    }
99
100
    /**
101
     * @param string $RoomTypes
102
     * @return \Gueststream\PMS\IQWare\API\GoogleEval
103
     */
104
    public function setRoomTypes($RoomTypes)
105
    {
106
        $this->RoomTypes = $RoomTypes;
107
        return $this;
108
    }
109
110
    /**
111
     * @return \DateTime
112
     */
113
    public function getFromDate()
114
    {
115
        if ($this->FromDate == null) {
116
            return null;
117
        } else {
118
            try {
119
                return new \DateTime($this->FromDate);
120
            } catch (\Exception $e) {
121
                return false;
122
            }
123
        }
124
    }
125
126
    /**
127
     * @param \DateTime $FromDate
128
     * @return \Gueststream\PMS\IQWare\API\GoogleEval
129
     */
130
    public function setFromDate(\DateTime $FromDate)
131
    {
132
        $this->FromDate = $FromDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $FromDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $FromDate.

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...
133
        return $this;
134
    }
135
136
    /**
137
     * @return int
138
     */
139
    public function getStayLength()
140
    {
141
        return $this->StayLength;
142
    }
143
144
    /**
145
     * @param int $StayLength
146
     * @return \Gueststream\PMS\IQWare\API\GoogleEval
147
     */
148
    public function setStayLength($StayLength)
149
    {
150
        $this->StayLength = $StayLength;
151
        return $this;
152
    }
153
154
    /**
155
     * @return int
156
     */
157
    public function getDayCount()
158
    {
159
        return $this->DayCount;
160
    }
161
162
    /**
163
     * @param int $DayCount
164
     * @return \Gueststream\PMS\IQWare\API\GoogleEval
165
     */
166
    public function setDayCount($DayCount)
167
    {
168
        $this->DayCount = $DayCount;
169
        return $this;
170
    }
171
}
172