RateChecker::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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