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

VideoMetadata   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 31
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDuration() 0 4 1
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