ScatterDataSet::getColor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace rtens\domin\delivery\web\renderers\charting\data;
2
3
use rtens\domin\parameters\Color;
4
5
class ScatterDataSet {
6
7
    /** @var string */
8
    private $label;
9
10
    /** @var ScatterDataPoint[] */
11
    private $dataPoints;
12
13
    /** @var Color|null */
14
    private $color;
15
16
    /**
17
     * @param ScatterDataPoint[] $dataPoints
18
     * @param string $label
19
     * @param Color $color
20
     */
21
    public function __construct(array $dataPoints, $label = '', Color $color = null) {
22
        $this->label = $label;
23
        $this->dataPoints = $dataPoints;
24
        $this->color = $color;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getLabel() {
31
        return $this->label;
32
    }
33
34
    /**
35
     * @return ScatterDataPoint[]
36
     */
37
    public function getDataPoints() {
38
        return $this->dataPoints;
39
    }
40
41
    /**
42
     * @return null|Color
43
     */
44
    public function getColor() {
45
        return $this->color;
46
    }
47
}