Passed
Pull Request — main (#20)
by Jeroen
02:09
created

UnresolvableDomainTagException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gember\EventSourcing\Resolver\Common\DomainTag;
6
7
use Exception;
8
9
final class UnresolvableDomainTagException extends Exception
10
{
11
    /**
12
     * @param class-string $className
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string.
Loading history...
13
     */
14 7
    public static function create(string $className, string $message): self
15
    {
16 7
        return new self(sprintf(
17 7
            'Unresolvable domain tags for class %s: %s',
18 7
            $className,
19 7
            $message,
20 7
        ));
21
    }
22
}
23