WordTreeOptions   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 10
c 3
b 0
f 0
dl 0
loc 38
ccs 0
cts 8
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setMaxFontSize() 0 5 1
A getWordtree() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\WordTree;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ChartOptions;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ColorsTrait;
7
use CMEN\GoogleChartsBundle\GoogleCharts\Options\FontNameTrait;
8
9
/**
10
 * @author Christophe Meneses
11
 */
12
class WordTreeOptions extends ChartOptions
13
{
14
    use ColorsTrait;
15
16
    use FontNameTrait;
17
18
    /**
19
     * The upper limit for font size of displayed words.
20
     *
21
     * @var int
22
     */
23
    protected $maxFontSize;
24
25
    /**
26
     * @var WordTree
27
     */
28
    protected $wordtree;
29
30
    public function __construct()
31
    {
32
        parent::__construct();
33
34
        $this->wordtree = new WordTree();
35
    }
36
37
    public function getWordtree(): WordTree
38
    {
39
        return $this->wordtree;
40
    }
41
42
    /**
43
     * @return $this
44
     */
45
    public function setMaxFontSize(int $maxFontSize)
46
    {
47
        $this->maxFontSize = $maxFontSize;
48
49
        return $this;
50
    }
51
}
52