Total Complexity | 7 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 46.15% |
Changes | 0 |
1 | <?php |
||
13 | class MappingException extends \Exception |
||
14 | { |
||
15 | /** |
||
16 | * @param string[] $namespaces |
||
17 | */ |
||
18 | 1 | public static function classNotFoundInNamespaces(string $className, array $namespaces) : self |
|
19 | { |
||
20 | 1 | return new self(sprintf( |
|
21 | 1 | "The class '%s' was not found in the chain configured namespaces %s", |
|
22 | 1 | $className, |
|
23 | 1 | implode(', ', $namespaces) |
|
24 | )); |
||
25 | } |
||
26 | |||
27 | public static function pathRequired() : self |
||
28 | { |
||
29 | return new self('Specifying the paths to your entities is required ' . |
||
30 | 'in the AnnotationDriver to retrieve all class names.'); |
||
31 | } |
||
32 | |||
33 | public static function fileMappingDriversRequireConfiguredDirectoryPath(?string $path = null) : self |
||
34 | { |
||
35 | if (! empty($path)) { |
||
36 | $path = '[' . $path . ']'; |
||
37 | } |
||
38 | |||
39 | return new self(sprintf( |
||
40 | 'File mapping drivers must have a valid directory path, ' . |
||
41 | 'however the given path %s seems to be incorrect!', |
||
42 | $path |
||
43 | )); |
||
44 | } |
||
45 | |||
46 | 2 | public static function mappingFileNotFound(string $entityName, string $fileName) : self |
|
52 | )); |
||
53 | } |
||
54 | |||
55 | public static function invalidMappingFile(string $entityName, string $fileName) : self |
||
61 | )); |
||
62 | } |
||
63 | |||
64 | 1 | public static function nonExistingClass(string $className) : self |
|
67 | } |
||
68 | } |
||
69 |