Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class OutputSentException extends LogicException implements SevereExceptionInterface, LocatableExceptionInterface |
||
17 | { |
||
18 | use HasSeverity; |
||
19 | |||
20 | /** |
||
21 | * Exception thrown when output has already been sent when attempting to emit an HTTP header. |
||
22 | * |
||
23 | * @param int $code The Exception code. |
||
24 | * @param \Throwable $previous The previous throwable used for the exception chaining. |
||
25 | */ |
||
26 | public function __construct(int $code = 0, Throwable $previous = null) |
||
27 | { |
||
28 | $message = 'Output already sent.'; |
||
29 | |||
30 | parent::__construct($message, $code, $previous); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * If required, set the file and line where the Exception was thrown. |
||
35 | * |
||
36 | * @param string $file |
||
37 | * @param int $line |
||
38 | * |
||
39 | * @return $this |
||
40 | */ |
||
41 | public function onFileLine(string $file, int $line): LocatableExceptionInterface |
||
49 | } |
||
50 | } |
||
51 |