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

ColorAxis::setColors()   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;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class ColorAxis
9
{
10
    /**
11
     * If present, specifies a minimum value for chart color data. Color data values of this value and lower will be
12
     * rendered as the first color in the colorAxis.colors range.
13
     *
14
     * @var int
15
     */
16
    protected $minValue;
17
18
    /**
19
     * If present, specifies a maximum value for chart color data. Color data values of this value and higher will be
20
     * rendered as the last color in the colorAxis.colors range.
21
     *
22
     * @var int
23
     */
24
    protected $maxValue;
25
26
    /**
27
     * If present, controls how values are associated with colors. Each value is associated with the corresponding
28
     * color in the colorAxis.colors array. These values apply to the chart color data. Coloring is done according to
29
     * a gradient of the values specified here. Not specifying a value for this option is equivalent to specifying
30
     * [minValue, maxValue].
31
     *
32
     * @var int[]
33
     */
34
    protected $values;
35
36
    use ColorsTrait;
37
38
    /**
39
     * @param int $minValue
40
     *
41
     * @return $this
42
     */
43
    public function setMinValue($minValue)
44
    {
45
        $this->minValue = $minValue;
46
47
        return $this;
48
    }
49
50
    /**
51
     * @param int $maxValue
52
     *
53
     * @return $this
54
     */
55
    public function setMaxValue($maxValue)
56
    {
57
        $this->maxValue = $maxValue;
58
59
        return $this;
60
    }
61
62
    /**
63
     * @param int[] $values
64
     *
65
     * @return $this
66
     */
67
    public function setValues($values)
68
    {
69
        $this->values = $values;
70
71
        return $this;
72
    }
73
}
74