Passed
Push — master ( 204398...443e32 )
by Chema
01:50 queued 12s
created

InvalidDateFormat::couldNotCreateFromTimestamp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chemaclass\StockTicker\Domain\Crawler\Site\MarketWatch\Exception;
6
7
use RuntimeException;
8
9
final class InvalidDateFormat extends RuntimeException
10
{
11
    public static function couldNotCreateFromTimestamp(int $timestamp): self
12
    {
13
        return new self(sprintf(
14
            'Could not create a dateTime for timestamp: "%s"',
15
            $timestamp
16
        ));
17
    }
18
}
19