BreakdownByDay   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 134
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 13
lcom 1
cbo 0
dl 0
loc 134
ccs 0
cts 57
cp 0
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBreakdownDate() 0 12 3
A setBreakdownDate() 0 5 1
A getBreakdownItems() 0 4 1
A setBreakdownItems() 0 5 1
A getBreakdownItemRoomCharge() 0 4 1
A setBreakdownItemRoomCharge() 0 5 1
A getMarkup() 0 4 1
A setMarkup() 0 5 1
A getListApplicableSpecialOffersRBO() 0 4 1
A setListApplicableSpecialOffersRBO() 0 5 1
1
<?php
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class BreakdownByDay
6
{
7
8
    /**
9
     * @var \DateTime $BreakdownDate
10
     */
11
    protected $BreakdownDate = null;
12
13
    /**
14
     * @var ArrayOfSummaryItem $BreakdownItems
15
     */
16
    protected $BreakdownItems = null;
17
18
    /**
19
     * @var SummaryItem $BreakdownItemRoomCharge
20
     */
21
    protected $BreakdownItemRoomCharge = null;
22
23
    /**
24
     * @var ArrayOfMarkupItem $Markup
25
     */
26
    protected $Markup = null;
27
28
    /**
29
     * @var ArrayOfApplicableSpecialOffersRBO $ListApplicableSpecialOffersRBO
30
     */
31
    protected $ListApplicableSpecialOffersRBO = null;
32
33
    /**
34
     * @param \DateTime $BreakdownDate
35
     */
36
    public function __construct(\DateTime $BreakdownDate)
37
    {
38
        $this->BreakdownDate = $BreakdownDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $BreakdownDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $BreakdownDate.

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
    }
40
41
    /**
42
     * @return \DateTime
43
     */
44
    public function getBreakdownDate()
45
    {
46
        if ($this->BreakdownDate == null) {
47
            return null;
48
        } else {
49
            try {
50
                return new \DateTime($this->BreakdownDate);
51
            } catch (\Exception $e) {
52
                return false;
53
            }
54
        }
55
    }
56
57
    /**
58
     * @param \DateTime $BreakdownDate
59
     * @return \Gueststream\PMS\IQWare\API\BreakdownByDay
60
     */
61
    public function setBreakdownDate(\DateTime $BreakdownDate)
62
    {
63
        $this->BreakdownDate = $BreakdownDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $BreakdownDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $BreakdownDate.

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...
64
        return $this;
65
    }
66
67
    /**
68
     * @return ArrayOfSummaryItem
69
     */
70
    public function getBreakdownItems()
71
    {
72
        return $this->BreakdownItems;
73
    }
74
75
    /**
76
     * @param ArrayOfSummaryItem $BreakdownItems
77
     * @return \Gueststream\PMS\IQWare\API\BreakdownByDay
78
     */
79
    public function setBreakdownItems($BreakdownItems)
80
    {
81
        $this->BreakdownItems = $BreakdownItems;
82
        return $this;
83
    }
84
85
    /**
86
     * @return SummaryItem
87
     */
88
    public function getBreakdownItemRoomCharge()
89
    {
90
        return $this->BreakdownItemRoomCharge;
91
    }
92
93
    /**
94
     * @param SummaryItem $BreakdownItemRoomCharge
95
     * @return \Gueststream\PMS\IQWare\API\BreakdownByDay
96
     */
97
    public function setBreakdownItemRoomCharge($BreakdownItemRoomCharge)
98
    {
99
        $this->BreakdownItemRoomCharge = $BreakdownItemRoomCharge;
100
        return $this;
101
    }
102
103
    /**
104
     * @return ArrayOfMarkupItem
105
     */
106
    public function getMarkup()
107
    {
108
        return $this->Markup;
109
    }
110
111
    /**
112
     * @param ArrayOfMarkupItem $Markup
113
     * @return \Gueststream\PMS\IQWare\API\BreakdownByDay
114
     */
115
    public function setMarkup($Markup)
116
    {
117
        $this->Markup = $Markup;
118
        return $this;
119
    }
120
121
    /**
122
     * @return ArrayOfApplicableSpecialOffersRBO
123
     */
124
    public function getListApplicableSpecialOffersRBO()
125
    {
126
        return $this->ListApplicableSpecialOffersRBO;
127
    }
128
129
    /**
130
     * @param ArrayOfApplicableSpecialOffersRBO $ListApplicableSpecialOffersRBO
131
     * @return \Gueststream\PMS\IQWare\API\BreakdownByDay
132
     */
133
    public function setListApplicableSpecialOffersRBO($ListApplicableSpecialOffersRBO)
134
    {
135
        $this->ListApplicableSpecialOffersRBO = $ListApplicableSpecialOffersRBO;
136
        return $this;
137
    }
138
}
139