Completed
Pull Request — master (#1)
by Woody
15:14
created

CommandException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A missingOption() 0 7 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
    public static function missingOption($name)
17
    {
18
        return new static(
19
            sprintf('Required option `%s` is not defined', $name),
20
            static::MISSING_OPTION
21
        );
22
    }
23
}
24