Passed
Push — master ( 3a1689...d265e3 )
by Christophe
02:39
created

Animation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 45
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setDuration() 0 6 1
A setEasing() 0 6 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class Animation
9
{
10
    /**
11
     * The duration of the animation, in milliseconds. For details, see the animation documentation.
12
     * {@link https://developers.google.com/chart/interactive/docs/animation}.
13
     *
14
     * @var int
15
     */
16
    protected $duration;
17
18
    /**
19
     * The easing function applied to the animation. The following options are available :
20
     * 'linear' - Constant speed.
21
     * 'in' - Ease in - Start slow and speed up.
22
     * 'out' - Ease out - Start fast and slow down.
23
     * 'inAndOut' - Ease in and out - Start slow, speed up, then slow down.
24
     *
25
     * @var string
26
     */
27
    protected $easing;
28
29
    /**
30
     * @param int $duration
31
     *
32
     * @return $this
33
     */
34
    public function setDuration($duration)
35
    {
36
        $this->duration = $duration;
37
38
        return $this;
39
    }
40
41
    /**
42
     * @param string $easing
43
     *
44
     * @return $this
45
     */
46
    public function setEasing($easing)
47
    {
48
        $this->easing = $easing;
49
50
        return $this;
51
    }
52
}
53