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

Biasing   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 96
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 8
c 2
b 0
f 2
lcom 0
cbo 0
dl 96
loc 96
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getBringToTop() 4 4 1
A setBringToTop() 5 5 1
A isAugmentBiases() 4 4 1
A setAugmentBiases() 5 5 1
A getInfluence() 4 4 1
A setInfluence() 5 5 1
A getBiases() 4 4 1
A setBiases() 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;
4
5 View Code Duplication
class Biasing
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
    /** @var string[] */
8
    private $bringToTop = array();
9
10
    /**
11
     * @var bool
12
     */
13
    private $augmentBiases = false;
14
15
    /**
16
     * @var float|null
17
     */
18
    private $influence = null;
19
20
    /**
21
     * @var Bias[]
22
     */
23
    private $biases = array();
24
25
    /**
26
     * @return string[]
27
     */
28
    public function getBringToTop()
29
    {
30
        return $this->bringToTop;
31
    }
32
33
    /**
34
     * @param string[] $bringToTop
35
     *
36
     * @return Biasing
37
     */
38
    public function setBringToTop($bringToTop)
39
    {
40
        $this->bringToTop = $bringToTop;
41
        return $this;
42
    }
43
44
    /**
45
     * @return boolean
46
     */
47
    public function isAugmentBiases()
48
    {
49
        return $this->augmentBiases;
50
    }
51
52
    /**
53
     * @param boolean $augmentBiases
54
     *
55
     * @return Biasing
56
     */
57
    public function setAugmentBiases($augmentBiases)
58
    {
59
        $this->augmentBiases = $augmentBiases;
60
        return $this;
61
    }
62
63
    /**
64
     * @return float|null
65
     */
66
    public function getInfluence()
67
    {
68
        return $this->influence;
69
    }
70
71
    /**
72
     * @param float|null $influence
73
     *
74
     * @return Biasing
75
     */
76
    public function setInfluence($influence)
77
    {
78
        $this->influence = $influence;
79
        return $this;
80
    }
81
82
    /**
83
     * @return Bias[]
84
     */
85
    public function getBiases()
86
    {
87
        return $this->biases;
88
    }
89
90
    /**
91
     * @param Bias[] $biases
92
     *
93
     * @return Biasing
94
     */
95
    public function setBiases($biases)
96
    {
97
        $this->biases = $biases;
98
        return $this;
99
    }
100
}