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

SeriesTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setSeries() 0 6 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