OrgChartOptions::setNodeClass()   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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
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\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