WebRes_GetCondoOwnerRoomInfo::getUserName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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

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...
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getIntGUID()
53
    {
54
        return $this->intGUID;
55
    }
56
57
    /**
58
     * @param int $intGUID
59
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoOwnerRoomInfo
60
     */
61
    public function setIntGUID($intGUID)
62
    {
63
        $this->intGUID = $intGUID;
64
        return $this;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getUserName()
71
    {
72
        return $this->userName;
73
    }
74
75
    /**
76
     * @param string $userName
77
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoOwnerRoomInfo
78
     */
79
    public function setUserName($userName)
80
    {
81
        $this->userName = $userName;
82
        return $this;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getPassword()
89
    {
90
        return $this->password;
91
    }
92
93
    /**
94
     * @param string $password
95
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoOwnerRoomInfo
96
     */
97
    public function setPassword($password)
98
    {
99
        $this->password = $password;
100
        return $this;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getStrISOLanguage()
107
    {
108
        return $this->strISOLanguage;
109
    }
110
111
    /**
112
     * @param string $strISOLanguage
113
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoOwnerRoomInfo
114
     */
115
    public function setStrISOLanguage($strISOLanguage)
116
    {
117
        $this->strISOLanguage = $strISOLanguage;
118
        return $this;
119
    }
120
121
    /**
122
     * @return \DateTime
123
     */
124
    public function getADate()
125
    {
126
        if ($this->aDate == null) {
127
            return null;
128
        } else {
129
            try {
130
                return new \DateTime($this->aDate);
131
            } catch (\Exception $e) {
132
                return false;
133
            }
134
        }
135
    }
136
137
    /**
138
     * @param \DateTime $aDate
139
     * @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoOwnerRoomInfo
140
     */
141
    public function setADate(\DateTime $aDate)
142
    {
143
        $this->aDate = $aDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $aDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $aDate.

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...
144
        return $this;
145
    }
146
}
147