Completed
Push — master ( 2994aa...19d116 )
by Patrick
08:28
created

VideoMetadata::getDuration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
namespace Dropbox\Models;
3
4
class VideoMetadata extends MediaMetadata
5
{
6
7
    /**
8
     * The duration of the video in milliseconds
9
     *
10
     * @var int
11
     */
12
    protected $duration;
13
14
    /**
15
     * Create a new VideoMetadata instance
16
     *
17
     * @param array $data
18
     */
19
    public function __construct(array $data)
20
    {
21
        parent::__construct($data);
22
        $this->duration = $this->getDataProperty('duration');
23
    }
24
25
    /**
26
     * Get the duration of the video
27
     *
28
     * @return int
29
     */
30
    public function getDuration()
31
    {
32
        return $this->duration;
33
    }
34
}
35