HandlerNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A notFound() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * GpsLab component.
6
 *
7
 * @author    Peter Gribanov <[email protected]>
8
 * @copyright Copyright (c) 2011, Peter Gribanov
9
 * @license   http://opensource.org/licenses/MIT
10
 */
11
12
namespace GpsLab\Component\Command\Exception;
13
14
use GpsLab\Component\Command\Command;
15
16
final class HandlerNotFoundException extends \RuntimeException
17
{
18
    /**
19
     * @param Command $command
20
     *
21
     * @return self
22
     */
23 1
    public static function notFound(Command $command): self
24
    {
25 1
        $parts = explode('\\', get_class($command));
26
27 1
        return new self(sprintf('Not found handler for command "%s".', end($parts)));
28
    }
29
}
30