BaseClassIsNotGeneric   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 1
dl 0
loc 5
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A cannotUse() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\PhpGenerics\Dissector\Error;
4
5
use TypeError;
6
use function sprintf;
7
8
final class BaseClassIsNotGeneric extends TypeError implements InvalidTypeArgument
9
{
10
    public static function cannotUse(string $class): InvalidTypeArgument
11
    {
12
        return new self(sprintf('%s is not a generic base class.', $class));
13
    }
14
}
15