Datum::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * Datum object lets you override Google Charts' choice for annotations provided for individual data elements
7
 * (such as values displayed with each bar on a bar chart).
8
 *
9
 * @author Christophe Meneses
10
 */
11
class Datum
12
{
13
    /**
14
     * @var Stem
15
     */
16
    protected $stem;
17
18
    /**
19
     * It can be either 'line' or 'point'.
20
     *
21
     * @var string
22
     */
23
    protected $style;
24
25 11
    public function __construct()
26
    {
27 11
        $this->stem = new Stem();
28
    }
29
30 2
    public function getStem(): Stem
31
    {
32 2
        return $this->stem;
33
    }
34
35
    /**
36
     * @return $this
37
     */
38 2
    public function setStyle(string $style)
39
    {
40 2
        $this->style = $style;
41
42 2
        return $this;
43
    }
44
}
45