Passed
Pull Request — master (#1317)
by
unknown
21:24
created

DateTime   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 21
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace ApacheSolrForTypo3\Solr\System\Data;
4
5
/*
6
 * This file is part of the TYPO3 CMS project.
7
 *
8
 * It is free software; you can redistribute it and/or modify it under
9
 * the terms of the GNU General Public License, either version 2
10
 * of the License, or any later version.
11
 *
12
 * For the full copyright and license information, please read the
13
 * LICENSE.txt file that was distributed with this source code.
14
 *
15
 * The TYPO3 project - inspiring people to share!
16
 */
17
18
/**
19
 * Class DateTimeProxy
20
 */
21
class DateTime extends \DateTime
22
{
23
    /**
24
     * @param string $time
25
     * @param \DateTimeZone $timezone
26
     */
27 4
    public function __construct($time = 'now', \DateTimeZone $timezone = null)
28
    {
29 4
        parent::__construct($time, $timezone);
30 4
    }
31
32
    /**
33
     * Returns the date formatted as ISO.
34
     *
35
     * @return string
36
     */
37 2
    public function __toString()
38
    {
39 2
        return $this->format(\DateTime::ISO8601);
40
    }
41
}
42