Legend::setPosition()   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\BubbleChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\TextStyle;
6
7
/**
8
 * @author Christophe Meneses
9
 */
10
class Legend
11
{
12
    /**
13
     * Position of the legend. Can be one of the following :
14
     *  'top' - Above the chart.
15
     *  'bottom' - Below the chart.
16
     *  'in' - Inside the chart, at the top.
17
     *  'none' - No legend is displayed.
18
     *
19
     * @var string
20
     */
21
    protected $position;
22
23
    /**
24
     * @var TextStyle
25
     */
26
    protected $textStyle;
27
28
    public function getTextStyle(): TextStyle
29
    {
30
        return $this->textStyle;
31
    }
32
33
    /**
34
     * @return $this
35
     */
36
    public function setPosition(string $position)
37
    {
38
        $this->position = $position;
39
40
        return $this;
41
    }
42
}
43