Crosshair   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setTrigger() 0 5 1
A getSelected() 0 3 1
A getFocused() 0 3 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
    use OpacityTrait;
13
14
    use OrientationTrait;
15
16
    /**
17
     * @var Focused
18
     */
19
    protected $focused;
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 3
    public function __construct()
37
    {
38 3
        $this->focused = new Focused();
39 3
        $this->selected = new Selected();
40
    }
41
42 1
    public function getFocused(): Focused
43
    {
44 1
        return $this->focused;
45
    }
46
47 1
    public function getSelected(): Selected
48
    {
49 1
        return $this->selected;
50
    }
51
52
    /**
53
     * @return $this
54
     */
55 1
    public function setTrigger(string $trigger)
56
    {
57 1
        $this->trigger = $trigger;
58
59 1
        return $this;
60
    }
61
}
62