ScatterDataSet   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 43
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getLabel() 0 3 1
A getDataPoints() 0 3 1
A getColor() 0 3 1
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
}