Passed
Push — master ( 29002c...f3df43 )
by Peter
04:37
created

NotFoundException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A source() 0 3 1
A page() 0 3 1
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 $source $id
17
     * @param string $id
18
     *
19
     * @return NotFoundException
20
     */
21 5
    public static function source($source, $id)
22
    {
23 5
        return new self(sprintf('%s with id "%s" not found.', ucfirst($source), $id));
24
    }
25
26
    /**
27
     * @return NotFoundException
28
     */
29 1
    public static function page()
30
    {
31 1
        return new self('Page not found.');
32
    }
33
}
34