InvalidConfigFilePathException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 5
rs 10
1
<?php
2
3
namespace FigTree\Config\Exceptions;
4
5
use Throwable;
6
use FigTree\Exceptions\RuntimeException;
7
8
/**
9
 * Exception thrown when a Config file is outside the search directories.
10
 */
11
class InvalidConfigFilePathException extends RuntimeException
12
{
13
	/**
14
	 * Exception thrown when a Config file is outside the search directories.
15
	 *
16
	 * @param string $filename The path to the Config file.
17
	 * @param int $code The Exception code.
18
	 * @param \Throwable $previous The previous throwable used for the exception chaining.
19
	 */
20
	public function __construct(string $filename, int $code = 0, Throwable $previous = null)
21
	{
22
		$message = sprintf('Config file %s is outside the search directories.', $filename);
23
24
		parent::__construct($message, $code, $previous);
25
	}
26
}
27