Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | final class NoSuchClass extends RuntimeException implements InvalidMapper |
||
17 | { |
||
18 | /** |
||
19 | * Produces an exception for when a class could not be loaded. |
||
20 | * |
||
21 | * @param string $className The name of the class that could not be loaded. |
||
22 | * @return InvalidMapper The exception object. |
||
23 | */ |
||
24 | public static function couldNotLoad(string $className): InvalidMapper |
||
25 | { |
||
26 | return new NoSuchClass(withMessage( |
||
27 | 'Could not produce mapping for non-existing class `%s`', |
||
28 | $className |
||
29 | )); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Produces an exception for when a container class could not be loaded. |
||
34 | * |
||
35 | * @param string $className The name of the class that could not be loaded. |
||
36 | * @return InvalidMapper The exception object. |
||
37 | */ |
||
38 | public static function couldNotLoadCollection(string $className): InvalidMapper |
||
43 | )); |
||
44 | } |
||
46 |