Datum   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 32
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStem() 0 3 1
A setStyle() 0 5 1
A __construct() 0 3 1
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