| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | class ConfigException extends ApplicationException |
||
| 8 | { |
||
| 9 | public static function forInvalidValue($key, $expectedType, $givenType): ConfigException |
||
| 10 | { |
||
| 11 | return new self("Invalid configuration at $key, expected $expectedType, given $givenType"); |
||
| 12 | } |
||
| 13 | |||
| 14 | public static function forUnreadableDirectory(string $dir) |
||
| 17 | } |
||
| 18 | |||
| 19 | public static function forUnsupportedFileType($path): ConfigException |
||
| 20 | { |
||
| 21 | return new self(sprintf( |
||
| 22 | '%s does not does not recognize the file: %s', |
||
| 23 | Config::class, |
||
| 24 | $path |
||
| 25 | )); |
||
| 26 | } |
||
| 27 | |||
| 28 | public static function forInvalidSource($source): ConfigException |
||
| 34 | )); |
||
| 35 | } |
||
| 37 |