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

Crosshair   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 5
dl 0
loc 65
ccs 11
cts 11
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFocused() 0 4 1
A getSelected() 0 4 1
A setTrigger() 0 6 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