Completed
Push — master ( 134712...8789de )
by Peter
06:34
created

HandlerNotFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

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