Total Complexity | 7 |
Total Lines | 74 |
Duplicated Lines | 0 % |
Coverage | 46.15% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class MappingException extends Exception |
||
15 | { |
||
16 | /** |
||
17 | * @param array<int, string> $namespaces |
||
18 | * |
||
19 | * @return self |
||
20 | */ |
||
21 | 1 | public static function classNotFoundInNamespaces( |
|
22 | string $className, |
||
23 | array $namespaces |
||
24 | ) { |
||
25 | 1 | return new self(sprintf( |
|
26 | 1 | "The class '%s' was not found in the chain configured namespaces %s", |
|
27 | 1 | $className, |
|
28 | 1 | implode(', ', $namespaces) |
|
29 | )); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return self |
||
34 | */ |
||
35 | public static function pathRequired() |
||
36 | { |
||
37 | return new self('Specifying the paths to your entities is required ' . |
||
38 | 'in the AnnotationDriver to retrieve all class names.'); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return self |
||
43 | */ |
||
44 | public static function fileMappingDriversRequireConfiguredDirectoryPath( |
||
55 | )); |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return self |
||
60 | */ |
||
61 | 2 | public static function mappingFileNotFound(string $entityName, string $fileName) |
|
67 | )); |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return self |
||
72 | */ |
||
73 | public static function invalidMappingFile(string $entityName, string $fileName) |
||
79 | )); |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * @return self |
||
84 | */ |
||
85 | 1 | public static function nonExistingClass(string $className) |
|
90 |