Test Failed
Push — master ( e6b57e...dd7c2d )
by Christophe
07:44
created

Crosshair::setOrientation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class Crosshair
9
{
10
    use ColorTrait;
11
12
    /**
13
     * @var Focused
14
     */
15
    protected $focused;
16
17
    use OpacityTrait;
18
19
    use OrientationTrait;
20
21
    /**
22
     * @var Selected
23
     */
24
    protected $selected;
25
26
    /**
27
     * Value can be :
28
     * 'both' : display on both focus and selection
29
     * 'focus' : display on focus only
30
     * 'selection' : display on selection only.
31
     *
32
     * @var string
33
     */
34
    protected $trigger;
35
36
    /**
37
     * Crosshair constructor.
38
     */
39
    public function __construct()
40
    {
41
        $this->focused = new Focused();
42
        $this->selected = new Selected();
43
    }
44
45
    /**
46
     * @return Focused
47
     */
48
    public function getFocused()
49
    {
50
        return $this->focused;
51
    }
52
53
    /**
54
     * @return Selected
55
     */
56
    public function getSelected()
57
    {
58
        return $this->selected;
59
    }
60
61
    /**
62
     * @param string $trigger
63
     *
64
     * @return $this
65
     */
66
    public function setTrigger($trigger)
67
    {
68
        $this->trigger = $trigger;
69
70
        return $this;
71
    }
72
}
73