Completed
Push — master ( 42303c...e671cd )
by Peter
01:28
created

NotFoundException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 20
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A page() 0 4 1
A wrap() 0 4 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\ShikimoriBrowserBundle\Exception;
12
13
class NotFoundException extends ErrorException
14
{
15
    /**
16
     * @return NotFoundException
17
     */
18
    public static function page()
19
    {
20
        return new self('Page not found.');
21
    }
22
23
    /**
24
     * @param \Exception $e
25
     *
26
     * @return NotFoundException
27
     */
28
    public static function wrap(\Exception $e)
29
    {
30
        return new self($e->getMessage(), $e->getCode(), $e);
31
    }
32
}
33