InternalErrorException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAssociatedStatusCode() 0 4 1
1
<?php
2
3
namespace Vectorface\SnappyRouter\Exception;
4
5
use \Exception;
6
use Vectorface\SnappyRouter\Response\AbstractResponse;
7
8
/**
9
 * A base class for all general server side internal exceptions.
10
 * @copyright Copyright (c) 2014, VectorFace, Inc.
11
 * @author Dan Bruce <[email protected]>
12
 */
13
class InternalErrorException extends Exception implements RouterExceptionInterface
14
{
15
    /**
16
     * Returns the associated status code with the exception. By default, most exceptions correspond
17
     * to a server error (HTTP 500). Override this method if you want your exception to generate a
18
     * different status code.
19
     * @return The associated status code.
20
     */
21 5
    public function getAssociatedStatusCode()
22
    {
23 5
        return AbstractResponse::RESPONSE_SERVER_ERROR;
24
    }
25
}
26