WebRes_GetCondoMonthlyStats::setGuid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 5
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 View Code Duplication
class WebRes_GetCondoMonthlyStats
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

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.

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

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

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...
119
        return $this;
120
    }
121
}
122