create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
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