RateChecker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
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 32
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 16 1
1
<?php
2
3
namespace Mhor\MediaInfo\Checker;
4
5
use Mhor\MediaInfo\Attribute\Rate;
6
7
class RateChecker extends AbstractAttributeChecker
8
{
9
    /**
10
     * @param array $value
11
     *
12
     * @return Rate
13
     */
14 4
    public function create($value): \Mhor\MediaInfo\Attribute\Rate
15
    {
16 4
        return new Rate($value[0], $value[1]);
17
    }
18
19
    /**
20
     * @return array
21
     */
22 6
    public function getMembersFields(): array
23
    {
24
        return [
25 6
            'maximum_bit_rate',
26
            'channel_s',
27
            'bit_rate',
28
            'sampling_rate',
29
            'bit_depth',
30
            'width',
31
            'nominal_bit_rate',
32
            'frame_rate',
33
            'format_settings_reframes',
34
            'height',
35
            'resolution',
36
        ];
37
    }
38
}
39