Passed
Push — master ( 12698d...f12359 )
by Christophe
03:07
created

LineChartOptions   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 131
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 15

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 8
c 0
b 0
f 0
lcom 0
cbo 15
dl 0
loc 131
ccs 24
cts 24
cp 1
rs 9.1666

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getAnimation() 0 4 1
A getAnnotations() 0 4 1
A getCrosshair() 0 4 1
A getExplorer() 0 4 1
A getHAxis() 0 4 1
A getLegend() 0 4 1
A setTrendlines() 0 6 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\LineChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedAnimation;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedHAxis;
7
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedLegend;
8
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Annotations;
9
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Crosshair;
10
use CMEN\GoogleChartsBundle\GoogleCharts\Options\CurveTypeTrait;
11
use CMEN\GoogleChartsBundle\GoogleCharts\Options\DataOpacityTrait;
12
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Explorer;
13
use CMEN\GoogleChartsBundle\GoogleCharts\Options\FocusTargetTrait;
14
use CMEN\GoogleChartsBundle\GoogleCharts\Options\InterpolateNullsTrait;
15
use CMEN\GoogleChartsBundle\GoogleCharts\Options\LineOptions;
16
use CMEN\GoogleChartsBundle\GoogleCharts\Options\OrientationTrait;
17
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ReverseCategoriesTrait;
18
use CMEN\GoogleChartsBundle\GoogleCharts\Options\SelectionModeTrait;
19
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Trendlines;
20
use CMEN\GoogleChartsBundle\GoogleCharts\Options\VAxesTrait;
21
22
/**
23
 * @author Christophe Meneses
24
 */
25
class LineChartOptions extends LineOptions
26
{
27
    /**
28
     * @var AdvancedAnimation
29
     */
30
    protected $animation;
31
32
    /**
33
     * @var Annotations
34
     */
35
    protected $annotations;
36
37
    /**
38
     * @var Crosshair
39
     */
40
    protected $crosshair;
41
42
    use CurveTypeTrait;
43
44
    use DataOpacityTrait;
45
46
    /**
47
     * @var Explorer
48
     */
49
    protected $explorer;
50
51
    use FocusTargetTrait;
52
53
    /**
54
     * @var AdvancedHAxis
55
     */
56
    protected $hAxis;
57
58
    use InterpolateNullsTrait;
59
60
    /**
61
     * @var AdvancedLegend
62
     */
63
    protected $legend;
64
65
    use OrientationTrait;
66
67
    use ReverseCategoriesTrait;
68
69
    use SelectionModeTrait;
70
71
    /**
72
     * Displays trendlines on the charts that support them. By default, linear trendlines are used, but this can be
73
     * customized with the trendlines.n.type option.
74
     *
75
     * @var Trendlines[]
76
     */
77
    protected $trendlines;
78
79
    use VAxesTrait;
80
81
    /**
82
     * LineChartOptions constructor.
83
     */
84 2
    public function __construct()
85
    {
86 2
        parent::__construct();
87
88 2
        $this->animation = new AdvancedAnimation();
89 2
        $this->annotations = new Annotations();
90 2
        $this->crosshair = new Crosshair();
91 2
        $this->explorer = new Explorer();
92 2
        $this->hAxis = new AdvancedHAxis();
93 2
        $this->legend = new AdvancedLegend();
94 2
    }
95
96
    /**
97
     * @return AdvancedAnimation
98
     */
99 1
    public function getAnimation()
100
    {
101 1
        return $this->animation;
102
    }
103
104
    /**
105
     * @return Annotations
106
     */
107 1
    public function getAnnotations()
108
    {
109 1
        return $this->annotations;
110
    }
111
112
    /**
113
     * @return Crosshair
114
     */
115 1
    public function getCrosshair()
116
    {
117 1
        return $this->crosshair;
118
    }
119
120
    /**
121
     * @return Explorer
122
     */
123 1
    public function getExplorer()
124
    {
125 1
        return $this->explorer;
126
    }
127
128
    /**
129
     * @return AdvancedHAxis
130
     */
131 1
    public function getHAxis()
132
    {
133 1
        return $this->hAxis;
134
    }
135
136
    /**
137
     * @return AdvancedLegend
138
     */
139 1
    public function getLegend()
140
    {
141 1
        return $this->legend;
142
    }
143
144
    /**
145
     * @param Trendlines[] $trendlines
146
     *
147
     * @return $this
148
     */
149 1
    public function setTrendlines($trendlines)
150
    {
151 1
        $this->trendlines = $trendlines;
152
153 1
        return $this;
154
    }
155
}
156