UnauthorizedException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

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