Passed
Push — master ( 75052b...8ecf83 )
by Dmitri
01:50
created

AuthorNotFound   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Application\Exception;
6
7
use App\Domain\Model\AuthorId;
8
use RuntimeException;
9
10
final class AuthorNotFound extends RuntimeException
11
{
12
    public static function byId(AuthorId $id): self
13
    {
14
        return new self(sprintf('Author by id "%s" not found.', (string) $id));
15
    }
16
}
17