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

HandlerNotFoundException::notFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 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