Completed
Pull Request — develop (#20)
by
unknown
03:43 queued 01:54
created

Bias   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 69
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 6
c 1
b 0
f 1
lcom 0
cbo 0
dl 69
loc 69
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 4 4 1
A setName() 5 5 1
A getContent() 4 4 1
A setContent() 5 5 1
A getStrength() 4 4 1
A setStrength() 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 GroupByInc\API\Request\Bias;
4
5 View Code Duplication
class Strength
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
    const Absolute_Increase = "Absolute_Increase";
8
    const Strong_Increase = "Strong_Increase";
9
    const Medium_Increase = "Medium_Increase";
10
    const Weak_Increase = "Weak_Increase";
11
    const Leave_Unchanged = "Leave_Unchanged";
12
    const Weak_Decrease = "Weak_Decrease";
13
    const Medium_Decrease = "Medium_Decrease";
14
    const Strong_Decrease = "Strong_Decrease";
15
    const Absolute_Decrease = "Absolute_Decrease";
16
}
17
18
namespace GroupByInc\API\Request;
19
20 View Code Duplication
class Bias
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...
21
{
22
23
    /** @var string */
24
    private $name;
25
26
    /** @var string */
27
    private $content;
28
29
    /** @var string */
30
    private $strength;
31
32
    /**
33
     * @return string
34
     */
35
    public function getName()
36
    {
37
        return $this->name;
38
    }
39
40
    /**
41
     * @param string $name
42
     *
43
     * @return Bias
44
     */
45
    public function setName($name)
46
    {
47
        $this->name = $name;
48
        return $this;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getContent()
55
    {
56
        return $this->content;
57
    }
58
59
    /**
60
     * @param string $content
61
     *
62
     * @return Bias
63
     */
64
    public function setContent($content)
65
    {
66
        $this->content = $content;
67
        return $this;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getStrength()
74
    {
75
        return $this->strength;
76
    }
77
78
    /**
79
     * @param string $strength
80
     *
81
     * @return Bias
82
     */
83
    public function setStrength($strength)
84
    {
85
        $this->strength = $strength;
86
        return $this;
87
    }
88
}
89