HeadersSentException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace FigTree\Exceptions;
4
5
use Throwable;
6
7
/**
8
 * Exception thrown when headers have already been sent when attempting to emit HTTP content.
9
 */
10
class HeadersSentException extends LogicException
11
{
12
	/**
13
	 * Exception thrown when headers have already been sent when attempting to emit HTTP content.
14
	 *
15
	 * @param int $code The Exception code.
16
	 * @param \Throwable $previous The previous throwable used for the exception chaining.
17
	 */
18
	
19
	public function __construct(int $code = 0, Throwable $previous = null)
20
	{
21
		$message = 'Headers already sent.';
22
23
		parent::__construct($message, $code, $previous);
24
25
		$this->severity = E_ERROR;
26
	}
27
}
28