DurationChecker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 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 7
    public function create($durations): \Mhor\MediaInfo\Attribute\Duration
15
    {
16 7
        return new Duration($durations[0]);
17
    }
18
19
    /**
20
     * @return array
21
     */
22 11
    public function getMembersFields(): array
23
    {
24
        return [
25 11
            'duration',
26
            'delay_relative_to_video',
27
            'video0_delay',
28
            'delay',
29
        ];
30
    }
31
}
32