| Total Complexity | 3 | 
| Total Lines | 36 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 16 | class InvalidPathException extends RuntimeException implements SevereExceptionInterface, LocatableExceptionInterface | ||
| 17 | { | ||
| 18 | use HasSeverity; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * Exception thrown when a path does not exist. | ||
| 22 | * | ||
| 23 | * @param string $path The path being checked for existence. | ||
| 24 | * @param int $code The Exception code. | ||
| 25 | * @param \Throwable $previous The previous throwable used for the exception chaining. | ||
| 26 | */ | ||
| 27 | public function __construct(string $path, int $code = 0, Throwable $previous = null) | ||
| 28 | 	{ | ||
| 29 | $this->severity = E_RECOVERABLE_ERROR; | ||
| 30 | |||
| 31 | 		$message = sprintf('Path %s does not exist.', $path); | ||
| 32 | |||
| 33 | parent::__construct($message, $code, $previous); | ||
| 34 | } | ||
| 35 | |||
| 36 | /** | ||
| 37 | * If required, set the file and line where the Exception was thrown. | ||
| 38 | * | ||
| 39 | * @param string $file | ||
| 40 | * @param int $line | ||
| 41 | * | ||
| 42 | * @return $this | ||
| 43 | */ | ||
| 44 | public function onFileLine(string $file, int $line): LocatableExceptionInterface | ||
| 52 | } | ||
| 53 | } | ||
| 54 |