Base   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 7 2
1
<?php
2
3
namespace HexMakina\Tempus;
4
5
abstract class Base
6
{
7
    public static function format($parm = 'now', $format)
8
    {
9
        try {
10
            $date = new \DateTimeImmutable("$parm");
11
            return $date->format($format);
12
        } catch (\Exception $e) {
13
            return null;
14
        }
15
    }
16
}
17