Passed
Pull Request — master (#44)
by David
02:04
created

ClassNotFoundException::couldNotFindClass()   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
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Annotations\Exceptions;
5
6
7
use InvalidArgumentException;
8
9
class ClassNotFoundException extends InvalidArgumentException
10
{
11
    public static function couldNotFindClass(string $className): self
12
    {
13
        return new self("Could not autoload class '$className'");
14
    }
15
16
    public static function wrapException(self $e, string $className): self
17
    {
18
        return new self($e->getMessage()." defined in @Type annotation of class '$className'");
19
    }
20
}
21