Test Failed
Pull Request — master (#89)
by
unknown
03:32
created

DateTimeChecker::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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