Passed
Push — master ( 4ed61c...14fd45 )
by Jakub
57s queued 13s
created

ClassNameException::missingMethod()   A

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 2
1
<?php declare(strict_types=1);
2
3
namespace Comquer\Reflection\ClassName;
4
5
use RuntimeException;
6
7
class ClassNameException extends RuntimeException
8
{
9
    public static function classDoesNotExist(string $className) : self
10
    {
11
        return new self("Class $className does not exist");
12
    }
13
14
    public static function missingMethod(string $className, string $methodName): self
15
    {
16
        return new self("Class $className is expected to implement method `$methodName` but it doesn't");
17
    }
18
19
    public static function missingImplementation(string $className, string $interfaceName)
20
    {
21
        return new self("Class $className is expected to implement interface `$interfaceName` but it doesn't");
22
    }
23
}