Bedding   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 80
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 80
loc 80
ccs 0
cts 31
cp 0
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 4 4 1
A getID_Bedding() 4 4 1
A setID_Bedding() 5 5 1
A getName() 4 4 1
A setName() 5 5 1
A getShortName() 4 4 1
A setShortName() 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 Bedding
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 $ID_Bedding
10
     */
11
    protected $ID_Bedding = null;
12
13
    /**
14
     * @var string $Name
15
     */
16
    protected $Name = null;
17
18
    /**
19
     * @var string $ShortName
20
     */
21
    protected $ShortName = null;
22
23
    /**
24
     * @param int $ID_Bedding
25
     */
26
    public function __construct($ID_Bedding)
27
    {
28
        $this->ID_Bedding = $ID_Bedding;
29
    }
30
31
    /**
32
     * @return int
33
     */
34
    public function getID_Bedding()
35
    {
36
        return $this->ID_Bedding;
37
    }
38
39
    /**
40
     * @param int $ID_Bedding
41
     * @return \Gueststream\PMS\IQWare\API\Bedding
42
     */
43
    public function setID_Bedding($ID_Bedding)
44
    {
45
        $this->ID_Bedding = $ID_Bedding;
46
        return $this;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getName()
53
    {
54
        return $this->Name;
55
    }
56
57
    /**
58
     * @param string $Name
59
     * @return \Gueststream\PMS\IQWare\API\Bedding
60
     */
61
    public function setName($Name)
62
    {
63
        $this->Name = $Name;
64
        return $this;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getShortName()
71
    {
72
        return $this->ShortName;
73
    }
74
75
    /**
76
     * @param string $ShortName
77
     * @return \Gueststream\PMS\IQWare\API\Bedding
78
     */
79
    public function setShortName($ShortName)
80
    {
81
        $this->ShortName = $ShortName;
82
        return $this;
83
    }
84
}
85