Total Complexity | 4 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class BaseException extends Exception |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * @param string $methodName |
||
28 | * @param string $className |
||
29 | * @return self |
||
30 | */ |
||
31 | public static function methodNotSupported(string $methodName, string $className): self |
||
32 | { |
||
33 | return new static( |
||
34 | "The method `$methodName` is not supported for `$className`", |
||
35 | E_WARNING |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param string $name |
||
41 | * @return self |
||
42 | */ |
||
43 | public static function adapterNotSupported(string $name): self |
||
44 | { |
||
45 | return new static( |
||
46 | "The adapter `$name` is not supported`", |
||
47 | E_ERROR |
||
48 | ); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @param string $name |
||
53 | * @return self |
||
54 | */ |
||
55 | public static function driverNotSupported(string $name): self |
||
60 | ); |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param string $name |
||
65 | * @return self |
||
66 | */ |
||
67 | public static function fileNotFound(string $name): self |
||
72 | ); |
||
73 | } |
||
74 | } |