Total Complexity | 2 |
Total Lines | 13 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | final class InvalidTypeException extends InvalidArgumentException |
||
10 | { |
||
11 | 122 | public static function onInstantiate(string $className, string $actualType, string $expectedType): self |
|
12 | { |
||
13 | 122 | return new self( |
|
14 | 122 | "Tried to instantiate a {$className} with a {$actualType}. Only accepts objects of type {$expectedType}." |
|
15 | ); |
||
16 | } |
||
17 | |||
18 | 48 | public static function onAdd(string $className, string $actualType, string $expectedType): self |
|
22 | ); |
||
23 | } |
||
25 |