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

InvalidDateFormat   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A couldNotCreateFromTimestamp() 0 5 1
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