Completed
Pull Request — master (#222)
by Alejandro
09:31
created

MissingRequiredOptionException::fromOption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Installer\Exception;
5
6
use RuntimeException;
7
use function sprintf;
8
9
class MissingRequiredOptionException extends RuntimeException implements ExceptionInterface
10
{
11
    public static function fromOption(string $optionName): self
12
    {
13
        return new self(sprintf('The "%s" is required and can\'t be empty', $optionName));
14
    }
15
}
16