Legend::setNumberFormat()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\GeoChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\MediumTextStyle;
6
7
/**
8
 * @author Christophe Meneses
9
 */
10
class Legend
11
{
12
    /**
13
     * A format string for numeric labels. This is a subset of the ICU pattern set . For instance, {numberFormat:'.##'}
14
     * will display values "10.66", "10.6", and "10.0" for values 10.666, 10.6, and 10.
15
     *
16
     * @var string
17
     */
18
    protected $numberFormat;
19
20
    /**
21
     * @var MediumTextStyle
22
     */
23
    protected $textStyle;
24
25
    public function __construct()
26
    {
27
        $this->textStyle = new MediumTextStyle();
28
    }
29
30
    public function getTextStyle(): MediumTextStyle
31
    {
32
        return $this->textStyle;
33
    }
34
35
    /**
36
     * @return $this
37
     */
38
    public function setNumberFormat(string $numberFormat)
39
    {
40
        $this->numberFormat = $numberFormat;
41
42
        return $this;
43
    }
44
}
45