Completed
Push — master ( 75ec1b...02ab52 )
by Carlos C
02:40
created

BadMethodCallException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Eclipxe\Enum\Exceptions;
6
7
use BadMethodCallException as PhpBadMethodCallException;
8
use Throwable;
9
10
class BadMethodCallException extends PhpBadMethodCallException implements EnumExceptionInterface
11
{
12 2
    public static function create(string $className, string $methodName, Throwable $previous = null)
13
    {
14 2
        return new static(
15 2
            sprintf('Call to undefined method %s::%s', $className, $methodName),
16 2
            0,
17
            $previous
18
        );
19
    }
20
}
21