Completed
Push — master ( 1bfde5...2c00e3 )
by Peter
03:16
created

HandlerNotFoundException   A

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
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\Query\Exception;
12
13
use GpsLab\Component\Query\Query;
14
15
class HandlerNotFoundException extends \RuntimeException
16
{
17
    /**
18
     * @param Query $query
19
     *
20
     * @return self
21
     */
22 1
    public static function notFound(Query $query)
23
    {
24 1
        $parts = explode('\\', get_class($query));
25
26 1
        return new self(sprintf('Not found handler for query "%s".', end($parts)));
27
    }
28
}
29