NotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
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 27
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getStatusCode() 0 4 1
1
<?php
2
3
namespace TreeHouse\BaseApiBundle\Exception;
4
5
/**
6
 * Exception for when a resource is not found
7
 */
8
class NotFoundException extends ApiException
9
{
10
    /**
11
     * @var integer
12
     */
13
    protected $statusCode;
14
15
    /**
16
     * @param string     $message  The internal exception message
17
     * @param \Exception $previous The previous exception
18
     * @param integer    $code     The internal exception code
19
     */
20
    public function __construct($message = null, \Exception $previous = null, $code = 0)
21
    {
22
        $this->statusCode = 404;
23
24
        parent::__construct($message, $code, $previous);
25
    }
26
27
    /**
28
     * @return integer
29
     */
30
    public function getStatusCode()
31
    {
32
        return $this->statusCode;
33
    }
34
}
35