RoomLocation   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 132
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 11
lcom 0
cbo 0
dl 132
loc 132
ccs 0
cts 52
cp 0
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 7 7 1
A getCode() 4 4 1
A setCode() 5 5 1
A getName() 4 4 1
A setName() 5 5 1
A getExtraAmt() 4 4 1
A setExtraAmt() 5 5 1
A getExtraAmtType() 4 4 1
A setExtraAmtType() 5 5 1
A getBillingType() 4 4 1
A setBillingType() 5 5 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Gueststream\PMS\IQWare\API;
4
5 View Code Duplication
class RoomLocation
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 $Code
10
     */
11
    protected $Code = null;
12
13
    /**
14
     * @var string $Name
15
     */
16
    protected $Name = null;
17
18
    /**
19
     * @var float $ExtraAmt
20
     */
21
    protected $ExtraAmt = null;
22
23
    /**
24
     * @var int $ExtraAmtType
25
     */
26
    protected $ExtraAmtType = null;
27
28
    /**
29
     * @var int $BillingType
30
     */
31
    protected $BillingType = null;
32
33
    /**
34
     * @param int $Code
35
     * @param float $ExtraAmt
36
     * @param int $ExtraAmtType
37
     * @param int $BillingType
38
     */
39
    public function __construct($Code, $ExtraAmt, $ExtraAmtType, $BillingType)
40
    {
41
        $this->Code = $Code;
42
        $this->ExtraAmt = $ExtraAmt;
43
        $this->ExtraAmtType = $ExtraAmtType;
44
        $this->BillingType = $BillingType;
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getCode()
51
    {
52
        return $this->Code;
53
    }
54
55
    /**
56
     * @param int $Code
57
     * @return \Gueststream\PMS\IQWare\API\RoomLocation
58
     */
59
    public function setCode($Code)
60
    {
61
        $this->Code = $Code;
62
        return $this;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getName()
69
    {
70
        return $this->Name;
71
    }
72
73
    /**
74
     * @param string $Name
75
     * @return \Gueststream\PMS\IQWare\API\RoomLocation
76
     */
77
    public function setName($Name)
78
    {
79
        $this->Name = $Name;
80
        return $this;
81
    }
82
83
    /**
84
     * @return float
85
     */
86
    public function getExtraAmt()
87
    {
88
        return $this->ExtraAmt;
89
    }
90
91
    /**
92
     * @param float $ExtraAmt
93
     * @return \Gueststream\PMS\IQWare\API\RoomLocation
94
     */
95
    public function setExtraAmt($ExtraAmt)
96
    {
97
        $this->ExtraAmt = $ExtraAmt;
98
        return $this;
99
    }
100
101
    /**
102
     * @return int
103
     */
104
    public function getExtraAmtType()
105
    {
106
        return $this->ExtraAmtType;
107
    }
108
109
    /**
110
     * @param int $ExtraAmtType
111
     * @return \Gueststream\PMS\IQWare\API\RoomLocation
112
     */
113
    public function setExtraAmtType($ExtraAmtType)
114
    {
115
        $this->ExtraAmtType = $ExtraAmtType;
116
        return $this;
117
    }
118
119
    /**
120
     * @return int
121
     */
122
    public function getBillingType()
123
    {
124
        return $this->BillingType;
125
    }
126
127
    /**
128
     * @param int $BillingType
129
     * @return \Gueststream\PMS\IQWare\API\RoomLocation
130
     */
131
    public function setBillingType($BillingType)
132
    {
133
        $this->BillingType = $BillingType;
134
        return $this;
135
    }
136
}
137