Passed
Push — master ( acfdea...483b01 )
by Peter
02:17
created

NotFoundException::manga()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * AnimeDb package.
5
 *
6
 * @author    Peter Gribanov <[email protected]>
7
 * @copyright Copyright (c) 2011, Peter Gribanov
8
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
9
 */
10
11
namespace AnimeDb\Bundle\AnimeNewsNetworkBrowserBundle\Exception;
12
13
class NotFoundException extends ErrorException
14
{
15
    /**
16
     * @param string $id
17
     *
18
     * @return NotFoundException
19
     */
20 3
    public static function anime($id)
21
    {
22 3
        return new self(sprintf('Anime "%s" not found.', $id));
23
    }
24
25
    /**
26
     * @param string $id
27
     *
28
     * @return NotFoundException
29
     */
30 3
    public static function manga($id)
31
    {
32 3
        return new self(sprintf('Manga "%s" not found.', $id));
33
    }
34
35
    /**
36
     * @param string $id
37
     *
38
     * @return NotFoundException
39
     */
40 3
    public static function title($id)
41
    {
42 3
        return new self(sprintf('Title "%s" not found.', $id));
43
    }
44
45
    /**
46
     * @return NotFoundException
47
     */
48 1
    public static function page()
49
    {
50 1
        return new self('Page not found.');
51
    }
52
}
53