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

UnresolvableDomainTagException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 2
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
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 8
    public static function create(string $className, string $message): self
15
    {
16 8
        return new self(sprintf(
17 8
            'Unresolvable domain tags for class %s: %s',
18 8
            $className,
19 8
            $message,
20 8
        ));
21
    }
22
}
23