Passed
Push — main ( a04a11...ed3749 )
by Dimitri
05:24
created

UnknownOptionException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 4
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of Blitz PHP framework.
5
 *
6
 * (c) 2022 Dimitri Sitchet Tomkeu <[email protected]>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace BlitzPHP\Exceptions;
13
14
use InvalidArgumentException;
15
use Throwable;
16
17
/**
18
 * @credit league/config (c) Colin O'Dell <[email protected]>
19
 */
20
final class UnknownOptionException extends InvalidArgumentException
21
{
22
    private string $path;
23
24
    public function __construct(string $message, string $path, int $code = 0, ?Throwable $previous = null)
25
    {
26
        parent::__construct($message, $code, $previous);
27
28
        $this->path = $path;
29
    }
30
31
    public function getPath(): string
32
    {
33
        return $this->path;
34
    }
35
}
36