Completed
Pull Request — master (#9)
by Adam
05:29
created

CommandException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 1
Metric Value
wmc 1
c 3
b 1
f 1
lcom 0
cbo 0
dl 0
loc 17
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A invalidCommand() 0 7 1
1
<?php
2
3
namespace Equip\Queue\Exception;
4
5
use Exception;
6
7
class CommandException extends Exception
8
{
9
    const INVALID = 1000;
10
11
    /**
12
     * @param string $name
13
     *
14
     * @return static
15
     */
16 2
    public static function invalidCommand($name)
17
    {
18 2
        return new static(
19 2
            sprintf('The command for `%s` is invalid.', $name),
20
            static::INVALID
21 2
        );
22
    }
23
}
24