Completed
Pull Request — master (#1)
by Woody
13:01
created

UnauthorizedException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
dl 0
loc 15
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getStatusCode() 0 4 1
1
<?php
2
namespace Equip\Auth\Exception;
3
4
/**
5
 * Exception that occurs when a user does not provide authentication
6
 * credentials.
7
 */
8
class UnauthorizedException extends AuthException
9
{
10
    public function __construct(
11
        $message = 'No authentication token was specified',
12
        $code = 0,
13
        \Exception $previous = null
14
    ) {
15
        parent::__construct($message, $code, $previous);
16
    }
17
18
    public function getStatusCode()
19
    {
20
        return 401;
21
    }
22
}
23