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

Animation::setEasing()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
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