Code Duplication    Length = 65-67 lines in 4 locations

src/API/cRateDaily.php 1 location

@@ 5-71 (lines=67) @@
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class cRateDaily
6
{
7
8
    /**
9
     * @var \DateTime $Date
10
     */
11
    protected $Date = null;
12
13
    /**
14
     * @var int $ID_RateCode
15
     */
16
    protected $ID_RateCode = null;
17
18
    /**
19
     * @param \DateTime $Date
20
     * @param int $ID_RateCode
21
     */
22
    public function __construct(\DateTime $Date, $ID_RateCode)
23
    {
24
        $this->Date = $Date->format(\DateTime::ATOM);
25
        $this->ID_RateCode = $ID_RateCode;
26
    }
27
28
    /**
29
     * @return \DateTime
30
     */
31
    public function getDate()
32
    {
33
        if ($this->Date == null) {
34
            return null;
35
        } else {
36
            try {
37
                return new \DateTime($this->Date);
38
            } catch (\Exception $e) {
39
                return false;
40
            }
41
        }
42
    }
43
44
    /**
45
     * @param \DateTime $Date
46
     * @return \Gueststream\PMS\IQWare\API\cRateDaily
47
     */
48
    public function setDate(\DateTime $Date)
49
    {
50
        $this->Date = $Date->format(\DateTime::ATOM);
51
        return $this;
52
    }
53
54
    /**
55
     * @return int
56
     */
57
    public function getID_RateCode()
58
    {
59
        return $this->ID_RateCode;
60
    }
61
62
    /**
63
     * @param int $ID_RateCode
64
     * @return \Gueststream\PMS\IQWare\API\cRateDaily
65
     */
66
    public function setID_RateCode($ID_RateCode)
67
    {
68
        $this->ID_RateCode = $ID_RateCode;
69
        return $this;
70
    }
71
}
72

src/API/getDailyInHouseOccupancy.php 1 location

@@ 5-71 (lines=67) @@
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class getDailyInHouseOccupancy
6
{
7
8
    /**
9
     * @var int $guid
10
     */
11
    protected $guid = null;
12
13
    /**
14
     * @var \DateTime $atDate
15
     */
16
    protected $atDate = null;
17
18
    /**
19
     * @param int $guid
20
     * @param \DateTime $atDate
21
     */
22
    public function __construct($guid, \DateTime $atDate)
23
    {
24
        $this->guid = $guid;
25
        $this->atDate = $atDate->format(\DateTime::ATOM);
26
    }
27
28
    /**
29
     * @return int
30
     */
31
    public function getGuid()
32
    {
33
        return $this->guid;
34
    }
35
36
    /**
37
     * @param int $guid
38
     * @return \Gueststream\PMS\IQWare\API\getDailyInHouseOccupancy
39
     */
40
    public function setGuid($guid)
41
    {
42
        $this->guid = $guid;
43
        return $this;
44
    }
45
46
    /**
47
     * @return \DateTime
48
     */
49
    public function getAtDate()
50
    {
51
        if ($this->atDate == null) {
52
            return null;
53
        } else {
54
            try {
55
                return new \DateTime($this->atDate);
56
            } catch (\Exception $e) {
57
                return false;
58
            }
59
        }
60
    }
61
62
    /**
63
     * @param \DateTime $atDate
64
     * @return \Gueststream\PMS\IQWare\API\getDailyInHouseOccupancy
65
     */
66
    public function setAtDate(\DateTime $atDate)
67
    {
68
        $this->atDate = $atDate->format(\DateTime::ATOM);
69
        return $this;
70
    }
71
}
72

src/API/RoomCalendarBreakdown.php 1 location

@@ 5-71 (lines=67) @@
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class RoomCalendarBreakdown
6
{
7
8
    /**
9
     * @var \DateTime $CalendarDate
10
     */
11
    protected $CalendarDate = null;
12
13
    /**
14
     * @var boolean $Available
15
     */
16
    protected $Available = null;
17
18
    /**
19
     * @param \DateTime $CalendarDate
20
     * @param boolean $Available
21
     */
22
    public function __construct(\DateTime $CalendarDate, $Available)
23
    {
24
        $this->CalendarDate = $CalendarDate->format(\DateTime::ATOM);
25
        $this->Available = $Available;
26
    }
27
28
    /**
29
     * @return \DateTime
30
     */
31
    public function getCalendarDate()
32
    {
33
        if ($this->CalendarDate == null) {
34
            return null;
35
        } else {
36
            try {
37
                return new \DateTime($this->CalendarDate);
38
            } catch (\Exception $e) {
39
                return false;
40
            }
41
        }
42
    }
43
44
    /**
45
     * @param \DateTime $CalendarDate
46
     * @return \Gueststream\PMS\IQWare\API\RoomCalendarBreakdown
47
     */
48
    public function setCalendarDate(\DateTime $CalendarDate)
49
    {
50
        $this->CalendarDate = $CalendarDate->format(\DateTime::ATOM);
51
        return $this;
52
    }
53
54
    /**
55
     * @return boolean
56
     */
57
    public function getAvailable()
58
    {
59
        return $this->Available;
60
    }
61
62
    /**
63
     * @param boolean $Available
64
     * @return \Gueststream\PMS\IQWare\API\RoomCalendarBreakdown
65
     */
66
    public function setAvailable($Available)
67
    {
68
        $this->Available = $Available;
69
        return $this;
70
    }
71
}
72

src/API/UnitDate.php 1 location

@@ 5-69 (lines=65) @@
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class UnitDate
6
{
7
8
    /**
9
     * @var \DateTime $ADate
10
     */
11
    protected $ADate = null;
12
13
    /**
14
     * @var ArrayOfUnitAvailable $Units
15
     */
16
    protected $Units = null;
17
18
    /**
19
     * @param \DateTime $ADate
20
     */
21
    public function __construct(\DateTime $ADate)
22
    {
23
        $this->ADate = $ADate->format(\DateTime::ATOM);
24
    }
25
26
    /**
27
     * @return \DateTime
28
     */
29
    public function getADate()
30
    {
31
        if ($this->ADate == null) {
32
            return null;
33
        } else {
34
            try {
35
                return new \DateTime($this->ADate);
36
            } catch (\Exception $e) {
37
                return false;
38
            }
39
        }
40
    }
41
42
    /**
43
     * @param \DateTime $ADate
44
     * @return \Gueststream\PMS\IQWare\API\UnitDate
45
     */
46
    public function setADate(\DateTime $ADate)
47
    {
48
        $this->ADate = $ADate->format(\DateTime::ATOM);
49
        return $this;
50
    }
51
52
    /**
53
     * @return ArrayOfUnitAvailable
54
     */
55
    public function getUnits()
56
    {
57
        return $this->Units;
58
    }
59
60
    /**
61
     * @param ArrayOfUnitAvailable $Units
62
     * @return \Gueststream\PMS\IQWare\API\UnitDate
63
     */
64
    public function setUnits($Units)
65
    {
66
        $this->Units = $Units;
67
        return $this;
68
    }
69
}
70