midgard_datetime   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * @author CONTENT CONTROL http://www.contentcontrol-berlin.de/
4
 * @copyright CONTENT CONTROL http://www.contentcontrol-berlin.de/
5
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
6
 */
7
8
class midgard_datetime extends DateTime
9
{
10 139
    public function __construct($time = 'now', $timezone = null)
11
    {
12 139
        parent::__construct($time, $timezone ?? new DateTimeZone('UTC'));
13
    }
14
15 5
    public function __toString()
16
    {
17 5
        return $this->format('c');
18
    }
19
}
20