DateTime   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 28
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
1
<?php
2
/**
3
 * Amadeus
4
 *
5
 * Copyright 2015 Amadeus Benelux NV
6
 */
7
8
namespace Amadeus\Client\Struct\SalesReports\DisplayQueryReport;
9
10
/**
11
 * DateTime
12
 *
13
 * @package Amadeus\Client\Struct\SalesReports\DisplayQueryReport
14
 * @author Dieter Devlieghere <[email protected]>
15
 */
16
class DateTime
17
{
18
    /**
19
     * @var string
20
     */
21
    public $year;
22
23
    /**
24
     * @var string
25
     */
26
    public $month;
27
28
    /**
29
     * @var string
30
     */
31
    public $day;
32
33
    /**
34
     * DateTime constructor.
35
     *
36
     * @param \DateTime|null $date
37
     */
38 15
    public function __construct($date)
39
    {
40 15
        if ($date instanceof \DateTime) {
41 15
            $this->year = $date->format('Y');
42 15
            $this->month = $date->format('m');
43 15
            $this->day = $date->format('d');
44 6
        }
45 15
    }
46
}
47