Code Duplication    Length = 150-150 lines in 2 locations

src/API/GetRoomTypeAvailability.php 1 location

@@ 5-154 (lines=150) @@
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class GetRoomTypeAvailability
6
{
7
8
    /**
9
     * @var int $RoomTypeID
10
     */
11
    protected $RoomTypeID = null;
12
13
    /**
14
     * @var int $guid
15
     */
16
    protected $guid = null;
17
18
    /**
19
     * @var \DateTime $start
20
     */
21
    protected $start = null;
22
23
    /**
24
     * @var \DateTime $end
25
     */
26
    protected $end = null;
27
28
    /**
29
     * @var boolean $isSuite
30
     */
31
    protected $isSuite = null;
32
33
    /**
34
     * @param int $RoomTypeID
35
     * @param int $guid
36
     * @param \DateTime $start
37
     * @param \DateTime $end
38
     * @param boolean $isSuite
39
     */
40
    public function __construct($RoomTypeID, $guid, \DateTime $start, \DateTime $end, $isSuite)
41
    {
42
        $this->RoomTypeID = $RoomTypeID;
43
        $this->guid = $guid;
44
        $this->start = $start->format(\DateTime::ATOM);
45
        $this->end = $end->format(\DateTime::ATOM);
46
        $this->isSuite = $isSuite;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getRoomTypeID()
53
    {
54
        return $this->RoomTypeID;
55
    }
56
57
    /**
58
     * @param int $RoomTypeID
59
     * @return \Gueststream\PMS\IQWare\API\GetRoomTypeAvailability
60
     */
61
    public function setRoomTypeID($RoomTypeID)
62
    {
63
        $this->RoomTypeID = $RoomTypeID;
64
        return $this;
65
    }
66
67
    /**
68
     * @return int
69
     */
70
    public function getGuid()
71
    {
72
        return $this->guid;
73
    }
74
75
    /**
76
     * @param int $guid
77
     * @return \Gueststream\PMS\IQWare\API\GetRoomTypeAvailability
78
     */
79
    public function setGuid($guid)
80
    {
81
        $this->guid = $guid;
82
        return $this;
83
    }
84
85
    /**
86
     * @return \DateTime
87
     */
88
    public function getStart()
89
    {
90
        if ($this->start == null) {
91
            return null;
92
        } else {
93
            try {
94
                return new \DateTime($this->start);
95
            } catch (\Exception $e) {
96
                return false;
97
            }
98
        }
99
    }
100
101
    /**
102
     * @param \DateTime $start
103
     * @return \Gueststream\PMS\IQWare\API\GetRoomTypeAvailability
104
     */
105
    public function setStart(\DateTime $start)
106
    {
107
        $this->start = $start->format(\DateTime::ATOM);
108
        return $this;
109
    }
110
111
    /**
112
     * @return \DateTime
113
     */
114
    public function getEnd()
115
    {
116
        if ($this->end == null) {
117
            return null;
118
        } else {
119
            try {
120
                return new \DateTime($this->end);
121
            } catch (\Exception $e) {
122
                return false;
123
            }
124
        }
125
    }
126
127
    /**
128
     * @param \DateTime $end
129
     * @return \Gueststream\PMS\IQWare\API\GetRoomTypeAvailability
130
     */
131
    public function setEnd(\DateTime $end)
132
    {
133
        $this->end = $end->format(\DateTime::ATOM);
134
        return $this;
135
    }
136
137
    /**
138
     * @return boolean
139
     */
140
    public function getIsSuite()
141
    {
142
        return $this->isSuite;
143
    }
144
145
    /**
146
     * @param boolean $isSuite
147
     * @return \Gueststream\PMS\IQWare\API\GetRoomTypeAvailability
148
     */
149
    public function setIsSuite($isSuite)
150
    {
151
        $this->isSuite = $isSuite;
152
        return $this;
153
    }
154
}
155

src/API/WebRes_GetOwnerRoomAvailability.php 1 location

@@ 5-154 (lines=150) @@
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class WebRes_GetOwnerRoomAvailability
6
{
7
8
    /**
9
     * @var int $guid
10
     */
11
    protected $guid = null;
12
13
    /**
14
     * @var int $roomID
15
     */
16
    protected $roomID = null;
17
18
    /**
19
     * @var \DateTime $startDate
20
     */
21
    protected $startDate = null;
22
23
    /**
24
     * @var \DateTime $endDate
25
     */
26
    protected $endDate = null;
27
28
    /**
29
     * @var boolean $isSuite
30
     */
31
    protected $isSuite = null;
32
33
    /**
34
     * @param int $guid
35
     * @param int $roomID
36
     * @param \DateTime $startDate
37
     * @param \DateTime $endDate
38
     * @param boolean $isSuite
39
     */
40
    public function __construct($guid, $roomID, \DateTime $startDate, \DateTime $endDate, $isSuite)
41
    {
42
        $this->guid = $guid;
43
        $this->roomID = $roomID;
44
        $this->startDate = $startDate->format(\DateTime::ATOM);
45
        $this->endDate = $endDate->format(\DateTime::ATOM);
46
        $this->isSuite = $isSuite;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getGuid()
53
    {
54
        return $this->guid;
55
    }
56
57
    /**
58
     * @param int $guid
59
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetOwnerRoomAvailability
60
     */
61
    public function setGuid($guid)
62
    {
63
        $this->guid = $guid;
64
        return $this;
65
    }
66
67
    /**
68
     * @return int
69
     */
70
    public function getRoomID()
71
    {
72
        return $this->roomID;
73
    }
74
75
    /**
76
     * @param int $roomID
77
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetOwnerRoomAvailability
78
     */
79
    public function setRoomID($roomID)
80
    {
81
        $this->roomID = $roomID;
82
        return $this;
83
    }
84
85
    /**
86
     * @return \DateTime
87
     */
88
    public function getStartDate()
89
    {
90
        if ($this->startDate == null) {
91
            return null;
92
        } else {
93
            try {
94
                return new \DateTime($this->startDate);
95
            } catch (\Exception $e) {
96
                return false;
97
            }
98
        }
99
    }
100
101
    /**
102
     * @param \DateTime $startDate
103
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetOwnerRoomAvailability
104
     */
105
    public function setStartDate(\DateTime $startDate)
106
    {
107
        $this->startDate = $startDate->format(\DateTime::ATOM);
108
        return $this;
109
    }
110
111
    /**
112
     * @return \DateTime
113
     */
114
    public function getEndDate()
115
    {
116
        if ($this->endDate == null) {
117
            return null;
118
        } else {
119
            try {
120
                return new \DateTime($this->endDate);
121
            } catch (\Exception $e) {
122
                return false;
123
            }
124
        }
125
    }
126
127
    /**
128
     * @param \DateTime $endDate
129
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetOwnerRoomAvailability
130
     */
131
    public function setEndDate(\DateTime $endDate)
132
    {
133
        $this->endDate = $endDate->format(\DateTime::ATOM);
134
        return $this;
135
    }
136
137
    /**
138
     * @return boolean
139
     */
140
    public function getIsSuite()
141
    {
142
        return $this->isSuite;
143
    }
144
145
    /**
146
     * @param boolean $isSuite
147
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetOwnerRoomAvailability
148
     */
149
    public function setIsSuite($isSuite)
150
    {
151
        $this->isSuite = $isSuite;
152
        return $this;
153
    }
154
}
155