Completed
Push — master ( 53961b...a16bad )
by Maxime
33s
created

RatioChecker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
A getMembersFields() 0 7 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)
15
    {
16 1
        $ratio = new Ratio($value[0], $value[1]);
17
18 1
        return $ratio;
19
    }
20
21
    /**
22
     * @return array
23
     */
24 5
    public function getMembersFields()
25
    {
26
        return array(
27 5
            'display_aspect_ratio',
28 5
            'original_display_aspect_ratio',
29 5
        );
30
    }
31
}
32