Test Failed
Push — master ( e6b57e...dd7c2d )
by Christophe
07:44
created

MediumChartOptions::setFontSize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class MediumChartOptions extends BasicChartOptions
9
{
10
    /**
11
     * The background color for the main area of the chart. Can be either a simple HTML color string, for example :
12
     * 'red' or '#00cc00', or a BackgroundColor object.
13
     *
14
     * @var string|AdvancedBackgroundColor
15
     */
16
    protected $backgroundColor;
17
18
    /**
19
     * An object with members to configure the placement and size of the chart area (where the chart itself is drawn,
20
     * excluding axis and legends).
21
     *
22
     * @var ChartArea
23
     */
24
    protected $chartArea;
25
26
    use ColorsTrait;
27
28
    use FontNameTrait;
29
30
    use FontSizeTrait;
31
32
    use TitleTrait;
33
34
    /**
35
     * @var TitleTextStyle
36
     */
37
    protected $titleTextStyle;
38
39
    /**
40
     * MediumChartOptions constructor.
41
     */
42
    public function __construct()
43
    {
44
        parent::__construct();
45
46
        $this->backgroundColor = new AdvancedBackgroundColor();
47
        $this->chartArea = new ChartArea();
48
        $this->titleTextStyle = new TitleTextStyle();
49
    }
50
51
    /**
52
     * @return AdvancedBackgroundColor
53
     */
54
    public function getBackgroundColor()
55
    {
56
        return $this->backgroundColor;
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->backgroundColor; of type string|CMEN\GoogleCharts...AdvancedBackgroundColor adds the type string to the return on line 56 which is incompatible with the return type documented by CMEN\GoogleChartsBundle\...ons::getBackgroundColor of type CMEN\GoogleChartsBundle\...AdvancedBackgroundColor.
Loading history...
57
    }
58
59
    /**
60
     * @return ChartArea
61
     */
62
    public function getChartArea()
63
    {
64
        return $this->chartArea;
65
    }
66 3
67
    /**
68 3
     * @return TitleTextStyle
69
     */
70 3
    public function getTitleTextStyle()
71 3
    {
72 3
        return $this->titleTextStyle;
73 3
    }
74
75
    /**
76
     * @param string $backgroundColor
77
     *
78
     * @return $this
79 1
     */
80
    public function setBackgroundColor($backgroundColor)
81 1
    {
82
        $this->backgroundColor = $backgroundColor;
83
84
        return $this;
85
    }
86
}
87