| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class FormatException extends RuntimeException implements ExceptionInterface |
||
| 20 | { |
||
| 21 | use DebugTraceableTrait; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Levée lorsque la classe instanciée n'existe pas. |
||
| 25 | */ |
||
| 26 | public static function invalidFormatter(string $class) |
||
| 27 | { |
||
| 28 | 2 | return new static(lang('Format.invalidFormatter', [$class])); |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Lancé dans JSONFormatter lorsque le json_encode produit |
||
| 33 | * un code d'erreur autre que JSON_ERROR_NONE et JSON_ERROR_RECURSION. |
||
| 34 | */ |
||
| 35 | public static function invalidJSON(?string $error = null) |
||
| 36 | { |
||
| 37 | return new static(lang('Format.invalidJSON', [$error])); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Levé lorsque le type MIME fourni n'a pas |
||
| 42 | * classe Formatter définie. |
||
| 43 | */ |
||
| 44 | public static function invalidMime(string $mime) |
||
| 45 | { |
||
| 46 | 2 | return new static(lang('Format.invalidMime', [$mime])); |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Lancé sur XMLFormatter lorsque l'extension `simplexml` |
||
| 51 | * N'est pas installé. |
||
| 52 | * |
||
| 53 | * @codeCoverageIgnore |
||
| 54 | */ |
||
| 55 | public static function missingExtension() |
||
| 58 | } |
||
| 59 | } |
||
| 60 |