GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Hover   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 118
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 20
dl 0
loc 118
rs 10
c 3
b 0
f 0
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getMode() 0 3 1
A getOnHover() 0 3 1
A jsonSerialize() 0 3 1
A getAnimationDuration() 0 3 1
A setAnimationDuration() 0 5 1
A getIntersect() 0 3 1
A setMode() 0 5 1
A isIntersect() 0 3 1
A setOnHover() 0 5 1
A setIntersect() 0 5 1
1
<?php
2
3
namespace Halfpastfour\PHPChartJS\Options;
4
5
use Halfpastfour\PHPChartJS\ArraySerializableInterface;
6
use Halfpastfour\PHPChartJS\Delegate\ArraySerializable;
7
use JsonSerializable;
8
use Laminas\Json\Expr;
9
10
/**
11
 * Class Hover
12
 *
13
 * @package Halfpastfour\PHPChartJS\Options
14
 */
15
class Hover implements ArraySerializableInterface, JsonSerializable
16
{
17
    use ArraySerializable;
18
19
    /**
20
     * @var string
21
     */
22
    private $mode;
23
24
    /**
25
     * @var bool
26
     */
27
    private $intersect;
28
29
    /**
30
     * @var int
31
     */
32
    private $animationDuration;
33
34
    /**
35
     * @var Expr
36
     */
37
    private $onHover;
38
39
    /**
40
     * @return string
41
     */
42
    public function getMode()
43
    {
44
        return $this->mode;
45
    }
46
47
    /**
48
     * @param string $mode
49
     *
50
     * @return $this
51
     */
52
    public function setMode($mode)
53
    {
54
        $this->mode = strval($mode);
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return bool
61
     */
62
    public function isIntersect()
63
    {
64
        return $this->intersect;
65
    }
66
67
    /**
68
     * @return bool
69
     */
70
    public function getIntersect()
71
    {
72
        return $this->intersect;
73
    }
74
75
    /**
76
     * @param bool $intersect
77
     *
78
     * @return $this
79
     */
80
    public function setIntersect($intersect)
81
    {
82
        $this->intersect = ! ! $intersect;
83
84
        return $this;
85
    }
86
87
    /**
88
     * @return int
89
     */
90
    public function getAnimationDuration()
91
    {
92
        return $this->animationDuration;
93
    }
94
95
    /**
96
     * @param int $animationDuration
97
     *
98
     * @return $this
99
     */
100
    public function setAnimationDuration($animationDuration)
101
    {
102
        $this->animationDuration = intval($animationDuration);
103
104
        return $this;
105
    }
106
107
    /**
108
     * @return \Laminas\Json\Expr
109
     */
110
    public function getOnHover()
111
    {
112
        return $this->onHover;
113
    }
114
115
    /**
116
     * @param Expr $onHover
117
     *
118
     * @return $this
119
     */
120
    public function setOnHover($onHover)
121
    {
122
        $this->onHover = new Expr(strval($onHover));
123
124
        return $this;
125
    }
126
127
    /**
128
     * @return array
129
     */
130
    public function jsonSerialize()
131
    {
132
        return $this->getArrayCopy();
133
    }
134
}
135