RatioChecker::getMembersFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Mhor\MediaInfo\Checker;
4
5
use Mhor\MediaInfo\Attribute\Ratio;
6
7
class RatioChecker extends AbstractAttributeChecker
8
{
9
    /**
10
     * @param array $value
11
     *
12
     * @return Ratio
13
     */
14 1
    public function create($value): \Mhor\MediaInfo\Attribute\Ratio
15
    {
16 1
        return new Ratio($value[0], $value[1]);
17
    }
18
19
    /**
20
     * @return array
21
     */
22 5
    public function getMembersFields(): array
23
    {
24
        return [
25 5
            'display_aspect_ratio',
26
            'original_display_aspect_ratio',
27
        ];
28
    }
29
}
30