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

UnknownOptionException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPath() 0 3 1
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