Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
FileConflictException
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3namespace Hyde\Framework\Exceptions;
4
5use Exception;
6
7class FileConflictException extends Exception
8{
9    protected $message = 'A file already exists at this path.';
10    protected $code = 409;
11
12    public function __construct(?string $path = null)
13    {
14        $this->message = $path ? "File already exists: {$path}" : $this->message;
15    }
16}