Completed
Pull Request — master (#1)
by Woody
23:31 queued 01:08
created

UnauthorizedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4286
cc 1
eloc 5
nc 1
nop 3
crap 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 3
    public function __construct(
11
        $message = 'No authentication token was specified',
12
        $code = 0,
13
        \Exception $previous = null
14
    ) {
15 3
        parent::__construct($message, $code, $previous);
16 3
    }
17
18 1
    public function getStatusCode()
19
    {
20 1
        return 401;
21
    }
22
}
23