Passed
Push — master ( e297c9...6645eb )
by Dawid
02:47
created

ControllerException::forMissingOption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Igni\Application\Exception;
4
5
use Igni\Exception\RuntimeException;
6
use Psr\Container\NotFoundExceptionInterface;
7
8
class ControllerException extends RuntimeException implements NotFoundExceptionInterface
9
{
10
    public static function forUndefinedController(string $controller): ControllerException
11
    {
12
        return new self("Controller ${controller} not found.");
13
    }
14
15
    public static function forMissingOption(string $option): ControllerException
16
    {
17
        return new self("Missing option `${option}` not found.");
18
    }
19
}
20