BaseClassIsNotGeneric::cannotUse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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