Completed
Push — master ( 7de3b3...4f8d98 )
by Woody
16:48 queued 39s
created

CommandException::missingOption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4286
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Equip\Command;
4
5
use RuntimeException;
6
7
class CommandException extends RuntimeException
8
{
9
    const MISSING_OPTION = 500;
10
11
    /**
12
     * @param string $name
13
     *
14
     * @return static
15
     */
16 1
    public static function missingOption($name)
17
    {
18 1
        return new static(
19 1
            sprintf('Required option `%s` is not defined', $name),
20
            static::MISSING_OPTION
21 1
        );
22
    }
23
}
24