Completed
Push — master ( 769b1c...ee0ee0 )
by Woody
03:01
created

ResponderException::invalidClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Equip\Exception;
4
5
use Equip\Adr\ResponderInterface;
6
use InvalidArgumentException;
7
8
class ResponderException extends InvalidArgumentException
9
{
10
    /**
11
     * @param string $spec
12
     *
13
     * @return static
14
     */
15 1
    public static function invalidClass($spec)
16
    {
17 1
        return new static(sprintf(
18 1
            'Responder class `%s` must implement `%s`',
19 1
            $spec,
20
            ResponderInterface::class
21 1
        ));
22
    }
23
}
24