1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Gueststream\PMS\IQWare\API; |
4
|
|
|
|
5
|
|
View Code Duplication |
class WebRes_GetCondoMonthlyStats |
|
|
|
|
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* @var int $guid |
10
|
|
|
*/ |
11
|
|
|
protected $guid = null; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @var int $ID_CondoOwner |
15
|
|
|
*/ |
16
|
|
|
protected $ID_CondoOwner = null; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @var CondoActivityTypeEnum $CondoActivityType |
20
|
|
|
*/ |
21
|
|
|
protected $CondoActivityType = null; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var \DateTime $ReportEOMDate |
25
|
|
|
*/ |
26
|
|
|
protected $ReportEOMDate = null; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @param int $guid |
30
|
|
|
* @param int $ID_CondoOwner |
31
|
|
|
* @param CondoActivityTypeEnum $CondoActivityType |
32
|
|
|
* @param \DateTime $ReportEOMDate |
33
|
|
|
*/ |
34
|
|
|
public function __construct($guid, $ID_CondoOwner, $CondoActivityType, \DateTime $ReportEOMDate) |
35
|
|
|
{ |
36
|
|
|
$this->guid = $guid; |
37
|
|
|
$this->ID_CondoOwner = $ID_CondoOwner; |
38
|
|
|
$this->CondoActivityType = $CondoActivityType; |
39
|
|
|
$this->ReportEOMDate = $ReportEOMDate->format(\DateTime::ATOM); |
|
|
|
|
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return int |
44
|
|
|
*/ |
45
|
|
|
public function getGuid() |
46
|
|
|
{ |
47
|
|
|
return $this->guid; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @param int $guid |
52
|
|
|
* @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoMonthlyStats |
53
|
|
|
*/ |
54
|
|
|
public function setGuid($guid) |
55
|
|
|
{ |
56
|
|
|
$this->guid = $guid; |
57
|
|
|
return $this; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @return int |
62
|
|
|
*/ |
63
|
|
|
public function getID_CondoOwner() |
64
|
|
|
{ |
65
|
|
|
return $this->ID_CondoOwner; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @param int $ID_CondoOwner |
70
|
|
|
* @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoMonthlyStats |
71
|
|
|
*/ |
72
|
|
|
public function setID_CondoOwner($ID_CondoOwner) |
73
|
|
|
{ |
74
|
|
|
$this->ID_CondoOwner = $ID_CondoOwner; |
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @return CondoActivityTypeEnum |
80
|
|
|
*/ |
81
|
|
|
public function getCondoActivityType() |
82
|
|
|
{ |
83
|
|
|
return $this->CondoActivityType; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @param CondoActivityTypeEnum $CondoActivityType |
88
|
|
|
* @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoMonthlyStats |
89
|
|
|
*/ |
90
|
|
|
public function setCondoActivityType($CondoActivityType) |
91
|
|
|
{ |
92
|
|
|
$this->CondoActivityType = $CondoActivityType; |
93
|
|
|
return $this; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return \DateTime |
98
|
|
|
*/ |
99
|
|
|
public function getReportEOMDate() |
100
|
|
|
{ |
101
|
|
|
if ($this->ReportEOMDate == null) { |
102
|
|
|
return null; |
103
|
|
|
} else { |
104
|
|
|
try { |
105
|
|
|
return new \DateTime($this->ReportEOMDate); |
106
|
|
|
} catch (\Exception $e) { |
107
|
|
|
return false; |
108
|
|
|
} |
109
|
|
|
} |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @param \DateTime $ReportEOMDate |
114
|
|
|
* @return \Gueststream\PMS\IQWare\API\WebRes_GetCondoMonthlyStats |
115
|
|
|
*/ |
116
|
|
|
public function setReportEOMDate(\DateTime $ReportEOMDate) |
117
|
|
|
{ |
118
|
|
|
$this->ReportEOMDate = $ReportEOMDate->format(\DateTime::ATOM); |
|
|
|
|
119
|
|
|
return $this; |
120
|
|
|
} |
121
|
|
|
} |
122
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.