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

SeriesTrait::setSeries()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
trait SeriesTrait
9
{
10
    /**
11
     * An array of Series object, each describing the format of the corresponding series in the chart. To use default
12
     * values for a series, specify a null value. If a series or a value is not specified, the global value
13
     * will be used.
14
     *
15
     * You can specify either an array of Series object, each of which applies to the series in the order given,
16
     * or you can specify an array where each child has a numeric key indicating which series it applies to.
17
     * For example, the following two declarations are identical :
18
     *
19
     * $chart->getOptions()->setSeries([$series1, null, $series3]);
20
     * $chart->getOptions()->setSeries([0 => $series1, 2 => $series3])
21
     *
22
     * @var array|Series[]
23
     */
24
    protected $series;
25
26
    /**
27
     * @param array|Series[] $series
28
     *
29
     * @return $this
30
     */
31
    public function setSeries($series)
32
    {
33
        $this->series = $series;
34
35
        return $this;
36
    }
37
}
38