Completed
Push — master ( 8607fa...0b4c0a )
by Adam
17:14 queued 05:28
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 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
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