Animation::setDuration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
     * @return $this
31
     */
32 2
    public function setDuration(int $duration)
33
    {
34 2
        $this->duration = $duration;
35
36 2
        return $this;
37
    }
38
39
    /**
40
     * @return $this
41
     */
42 2
    public function setEasing(string $easing)
43
    {
44 2
        $this->easing = $easing;
45
46 2
        return $this;
47
    }
48
}
49