setIntGUID()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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

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

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...
40
    }
41
42
    /**
43
     * @return int
44
     */
45
    public function getIntGUID()
46
    {
47
        return $this->intGUID;
48
    }
49
50
    /**
51
     * @param int $intGUID
52
     * @return \Gueststream\PMS\IQWare\API\BeachChairGetAvailElementsSitesForStay
53
     */
54
    public function setIntGUID($intGUID)
55
    {
56
        $this->intGUID = $intGUID;
57
        return $this;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getStrLanguage()
64
    {
65
        return $this->strLanguage;
66
    }
67
68
    /**
69
     * @param string $strLanguage
70
     * @return \Gueststream\PMS\IQWare\API\BeachChairGetAvailElementsSitesForStay
71
     */
72
    public function setStrLanguage($strLanguage)
73
    {
74
        $this->strLanguage = $strLanguage;
75
        return $this;
76
    }
77
78
    /**
79
     * @return \DateTime
80
     */
81
    public function getArrDate()
82
    {
83
        if ($this->arrDate == null) {
84
            return null;
85
        } else {
86
            try {
87
                return new \DateTime($this->arrDate);
88
            } catch (\Exception $e) {
89
                return false;
90
            }
91
        }
92
    }
93
94
    /**
95
     * @param \DateTime $arrDate
96
     * @return \Gueststream\PMS\IQWare\API\BeachChairGetAvailElementsSitesForStay
97
     */
98
    public function setArrDate(\DateTime $arrDate)
99
    {
100
        $this->arrDate = $arrDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $arrDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $arrDate.

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...
101
        return $this;
102
    }
103
104
    /**
105
     * @return \DateTime
106
     */
107
    public function getDepDate()
108
    {
109
        if ($this->depDate == null) {
110
            return null;
111
        } else {
112
            try {
113
                return new \DateTime($this->depDate);
114
            } catch (\Exception $e) {
115
                return false;
116
            }
117
        }
118
    }
119
120
    /**
121
     * @param \DateTime $depDate
122
     * @return \Gueststream\PMS\IQWare\API\BeachChairGetAvailElementsSitesForStay
123
     */
124
    public function setDepDate(\DateTime $depDate)
125
    {
126
        $this->depDate = $depDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $depDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $depDate.

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...
127
        return $this;
128
    }
129
}
130