UniqueTokenIdentifierConstraintViolationException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
1
<?php
2
3
/**
4
 * @author      Ivan Kurnosov <[email protected]>
5
 * @copyright   Copyright (c) Alex Bilbie
6
 * @license     http://mit-license.org/
7
 *
8
 * @link        https://github.com/thephpleague/oauth2-server
9
 */
10
11
declare(strict_types=1);
12
13
namespace League\OAuth2\Server\Exception;
14
15
class UniqueTokenIdentifierConstraintViolationException extends OAuthServerException
16
{
17 6
    public static function create(): UniqueTokenIdentifierConstraintViolationException
18
    {
19 6
        $errorMessage = 'Could not create unique access token identifier';
20
21 6
        return new static($errorMessage, 100, 'access_token_duplicate', 500);
22
    }
23
}
24