These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace CMEN\GoogleChartsBundle\GoogleCharts\Options; |
||
4 | |||
5 | /** |
||
6 | * @author Christophe Meneses |
||
7 | */ |
||
8 | View Code Duplication | class MinorGridlines |
|
0 ignored issues
–
show
|
|||
9 | { |
||
10 | /** |
||
11 | * The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $color; |
||
16 | |||
17 | /** |
||
18 | * The number of horizontal minor gridlines between two regular gridlines. |
||
19 | * |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $count; |
||
23 | |||
24 | /** |
||
25 | * @var Units |
||
26 | */ |
||
27 | protected $units; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * MinorGridlines constructor. |
||
32 | */ |
||
33 | 3 | public function __construct() |
|
34 | { |
||
35 | 3 | $this->units = new Units(); |
|
36 | 3 | } |
|
37 | |||
38 | |||
39 | /** |
||
40 | * @return Units |
||
41 | */ |
||
42 | 1 | public function getUnits() |
|
43 | { |
||
44 | 1 | return $this->units; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param string $color |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | 1 | public function setColor($color) |
|
53 | { |
||
54 | 1 | $this->color = $color; |
|
55 | |||
56 | 1 | return $this; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @param int $count |
||
61 | * |
||
62 | * @return $this |
||
63 | */ |
||
64 | 1 | public function setCount($count) |
|
65 | { |
||
66 | 1 | $this->count = $count; |
|
67 | |||
68 | 1 | return $this; |
|
69 | } |
||
70 | } |
||
71 |
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.