OutputSentException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 7
rs 10
1
<?php
2
3
namespace FigTree\Exceptions;
4
5
use Throwable;
6
7
/**
8
 * Exception thrown when output has already been sent when attempting to emit an HTTP header.
9
 */
10
class OutputSentException extends LogicException
11
{
12
	/**
13
	 * Exception thrown when output has already been sent when attempting to emit an HTTP header.
14
	 *
15
	 * @param int $code The Exception code.
16
	 * @param \Throwable $previous The previous throwable used for the exception chaining.
17
	 */
18
	public function __construct(int $code = 0, Throwable $previous = null)
19
	{
20
		$message = 'Output already sent.';
21
22
		parent::__construct($message, $code, $previous);
23
24
		$this->severity = E_ERROR;
25
	}
26
}
27