OrgChartOptions   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 72
ccs 0
cts 12
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setSize() 0 5 1
A setNodeClass() 0 5 1
A setAllowCollapse() 0 5 1
A setSelectedNodeClass() 0 5 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\OrgChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AllowHtmlTrait;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ChartOptionsInterface;
7
8
/**
9
 * @author Christophe Meneses
10
 */
11
class OrgChartOptions implements ChartOptionsInterface
12
{
13
    use AllowHtmlTrait;
14
15
    /**
16
     * Determines if double click will collapse a node.
17
     *
18
     * @var bool
19
     */
20
    protected $allowCollapse;
21
22
    /**
23
     * A class name to assign to node elements. Apply CSS to this class name to specify colors or styles for the chart
24
     * elements.
25
     *
26
     * @var string
27
     */
28
    protected $nodeClass;
29
30
    /**
31
     * A class name to assign to selected node elements. Apply CSS to this class name to specify colors or styles for
32
     * selected chart elements.
33
     *
34
     * @var string
35
     */
36
    protected $selectedNodeClass;
37
38
    /**
39
     * 'small', 'medium' or 'large'.
40
     *
41
     * @var string
42
     */
43
    protected $size;
44
45
    /**
46
     * @return $this
47
     */
48
    public function setAllowCollapse(bool $allowCollapse)
49
    {
50
        $this->allowCollapse = $allowCollapse;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @return $this
57
     */
58
    public function setNodeClass(string $nodeClass)
59
    {
60
        $this->nodeClass = $nodeClass;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return $this
67
     */
68
    public function setSelectedNodeClass(string $selectedNodeClass)
69
    {
70
        $this->selectedNodeClass = $selectedNodeClass;
71
72
        return $this;
73
    }
74
75
    /**
76
     * @return $this
77
     */
78
    public function setSize(string $size)
79
    {
80
        $this->size = $size;
81
82
        return $this;
83
    }
84
}
85