ResultClassOrInterfaceNotFound   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromString() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cushon\HealthBundle\QueryBus\ResultAssertion\Exception;
6
7
use Cushon\HealthBundle\QueryBus\Exception\QueryBusError;
8
use InvalidArgumentException;
9
10
final class ResultClassOrInterfaceNotFound extends InvalidArgumentException implements AssertionError
11
{
12
    /**
13
     * @param string $classOrInterface
14
     * @return static
15
     */
16
    public static function fromString(string $classOrInterface): self
17
    {
18
        return new self(sprintf('Could not find a class or interface called %s', $classOrInterface));
19
    }
20
}
21