UnsupportedDateFormatException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFormat() 0 3 1
A __construct() 0 7 1
1
<?php
2
3
namespace Graze\CiffRenderer\Exception;
4
5
use \InvalidArgumentException;
6
use Graze\CiffRenderer\Exception\ExceptionInterface;
7
8
class UnsupportedDateFormatException extends InvalidArgumentException implements ExceptionInterface
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $format;
14
15
    /**
16
     * @param string $format
17
     * @param null|Exception $previous
18
     */
19
    public function __construct($format, \Exception $previous = null)
20
    {
21
        $this->format = $format;
22
23
        $message = sprintf('Unsupported date format [%s]', $format);
24
25
        parent::__construct($message, 0, $previous);
26
    }
27
    /**
28
     * @return string
29
     */
30
    public function getFormat()
31
    {
32
        return $this->format;
33
    }
34
}
35