Passed
Branch dev (e23247)
by Alan
01:51
created

InvalidClassException::onFileLine()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace FigTree\Exceptions;
4
5
use Throwable;
6
7
/**
8
 * Exception thrown when a class does not exist.
9
 */
10
class InvalidClassException extends LogicException
11
{
12
	/**
13
	 * Exception thrown when a class does not exist.
14
	 *
15
	 * @param string $inputClass The class being checked for existence.
16
	 * @param int $code The Exception code.
17
	 * @param \Throwable $previous The previous throwable used for the exception chaining.
18
	 */
19
	public function __construct(string $inputClass, int $code = 0, Throwable $previous = null)
20
	{
21
		$message = sprintf('%s is not a valid class name.', $inputClass);
22
23
		parent::__construct($message, $code, $previous);
24
	}
25
}
26