Series   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 60
ccs 0
cts 13
cp 0
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setType() 0 5 1
A getFallingColor() 0 3 1
A getAnnotations() 0 3 1
A getRisingColor() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\ComboChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Annotations;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AreaOpacityTrait;
7
use CMEN\GoogleChartsBundle\GoogleCharts\Options\CurveTypeTrait;
8
use CMEN\GoogleChartsBundle\GoogleCharts\Options\FallingColor;
9
use CMEN\GoogleChartsBundle\GoogleCharts\Options\LineSeries;
10
use CMEN\GoogleChartsBundle\GoogleCharts\Options\RisingColor;
11
12
/**
13
 * @author Christophe Meneses
14
 */
15
class Series extends LineSeries
16
{
17
    use AreaOpacityTrait;
18
19
    use CurveTypeTrait;
20
21
    /**
22
     * @var Annotations
23
     */
24
    protected $annotations;
25
26
    /**
27
     * @var FallingColor
28
     */
29
    protected $fallingColor;
30
31
    /**
32
     * @var RisingColor
33
     */
34
    protected $risingColor;
35
36
    /**
37
     * The type of marker for this series. Valid values are 'line', 'area', 'bars', 'candlesticks' and 'steppedArea'.
38
     * Note that bars are actually vertical bars (columns). The default value is specified by the chart's seriesType
39
     * option.
40
     *
41
     * @var string
42
     */
43
    protected $type;
44
45
    public function __construct()
46
    {
47
        $this->annotations = new Annotations();
48
        $this->fallingColor = new FallingColor();
49
        $this->risingColor = new RisingColor();
50
    }
51
52
    public function getAnnotations(): Annotations
53
    {
54
        return $this->annotations;
55
    }
56
57
    public function getFallingColor(): FallingColor
58
    {
59
        return $this->fallingColor;
60
    }
61
62
    public function getRisingColor(): RisingColor
63
    {
64
        return $this->risingColor;
65
    }
66
67
    /**
68
     * @return $this
69
     */
70
    public function setType(string $type)
71
    {
72
        $this->type = $type;
73
74
        return $this;
75
    }
76
}
77