Passed
Branch master (b4f9b9)
by Maxime
03:00
created

DurationChecker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
A getMembersFields() 0 9 1
1
<?php
2
3
namespace Mhor\MediaInfo\Checker;
4
5
use Mhor\MediaInfo\Attribute\Duration;
6
7
class DurationChecker extends AbstractAttributeChecker
8
{
9
    /**
10
     * @param array $durations
11
     *
12
     * @return Duration
13
     */
14 6
    public function create($durations)
15
    {
16 6
        $duration = new Duration($durations[0]);
17
18 6
        return $duration;
19
    }
20
21
    /**
22
     * @return array
23
     */
24 6
    public function getMembersFields()
25
    {
26
        return array(
27 6
            'duration',
28 6
            'delay_relative_to_video',
29 6
            'video0_delay',
30 6
            'delay',
31 6
        );
32
    }
33
}
34