OaccTelephone   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 85
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 85
loc 85
ccs 0
cts 32
cp 0
rs 10
c 0
b 0
f 0

7 Methods

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