Legend   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

3 Methods

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