UnauthorizedException   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
 * An exception indicating that authentication is required and has failed or has
10
 * not yet been provided
11
 *
12
 * @copyright Copyright (c) 2014, VectorFace, Inc.
13
 * @author J. Anderson <[email protected]>
14
 * @author Dan Bruce   <[email protected]>
15
 */
16
class UnauthorizedException extends Exception implements RouterExceptionInterface
17
{
18
    /**
19
     * Gets the status code that corresponds to this exception. This is usually
20
     * an HTTP status code.
21
     *
22
     * @return int The status code associated with this exception.
23
     */
24 2
    public function getAssociatedStatusCode()
25
    {
26 2
        return AbstractResponse::RESPONSE_UNAUTHORIZED;
27
    }
28
}
29