Passed
Push — master ( fd6ae4...b59e9d )
by Carlos C
01:58
created

IndexOverrideException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Eclipxe\Enum\Exceptions;
6
7
use Throwable;
8
9
class IndexOverrideException extends GenericOverrideException
10
{
11 1
    public static function create(string $className, string $value, Throwable $previous = null): self
12
    {
13
        // StatusEnum cannot override index to x
14 1
        return new self(static::formatGenericMessage($className, 'index', $value), 0, $previous);
15
    }
16
}
17