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

ScatterChartOptions::setLineWidth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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