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\GanttChart; |
||
4 | |||
5 | /** |
||
6 | * The styles for task labels. |
||
7 | * |
||
8 | * @author Christophe Meneses |
||
9 | */ |
||
10 | View Code Duplication | class LabelStyle |
|
0 ignored issues
–
show
|
|||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $fontName; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $fontSize; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $color; |
||
26 | |||
27 | /** |
||
28 | * @param string $fontName |
||
29 | * |
||
30 | * @return $this |
||
31 | */ |
||
32 | public function setFontName($fontName) |
||
33 | { |
||
34 | $this->fontName = $fontName; |
||
35 | |||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param int $fontSize |
||
41 | * |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function setFontSize($fontSize) |
||
45 | { |
||
46 | $this->fontSize = $fontSize; |
||
47 | |||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @param string $color |
||
53 | * |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function setColor($color) |
||
57 | { |
||
58 | $this->color = $color; |
||
59 | |||
60 | return $this; |
||
61 | } |
||
62 | } |
||
63 |
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.