Passed
Push — master ( 12698d...f12359 )
by Christophe
03:07
created

Crosshair::getFocused()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
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 2
    public function __construct()
40
    {
41 2
        $this->focused = new Focused();
42 2
        $this->selected = new Selected();
43 2
    }
44
45
    /**
46
     * @return Focused
47
     */
48 1
    public function getFocused()
49
    {
50 1
        return $this->focused;
51
    }
52
53
    /**
54
     * @return Selected
55
     */
56 1
    public function getSelected()
57
    {
58 1
        return $this->selected;
59
    }
60
61
    /**
62
     * @param string $trigger
63
     *
64
     * @return $this
65
     */
66 1
    public function setTrigger($trigger)
67
    {
68 1
        $this->trigger = $trigger;
69
70 1
        return $this;
71
    }
72
}
73