rhertogh /
yii2-oauth2-server
| 1 | <?php |
||
| 2 | |||
| 3 | namespace rhertogh\Yii2Oauth2Server\exceptions; |
||
| 4 | |||
| 5 | use League\OAuth2\Server\Exception\UniqueTokenIdentifierConstraintViolationException; |
||
| 6 | use rhertogh\Yii2Oauth2Server\interfaces\exceptions\Oauth2ServerExceptionInterface; |
||
| 7 | |||
| 8 | // phpcs:ignore Generic.Files.LineLength.TooLong |
||
| 9 | class Oauth2UniqueTokenIdentifierConstraintViolationException extends UniqueTokenIdentifierConstraintViolationException implements |
||
| 10 | Oauth2ServerExceptionInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @inheritDoc |
||
| 14 | * @param null $message |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 15 | * @return static |
||
| 16 | */ |
||
| 17 | 2 | public static function create($errorMessage = null) |
|
| 18 | { |
||
| 19 | 2 | if (empty($errorMessage)) { |
|
| 20 | 1 | $errorMessage = 'Could not create unique access token identifier'; |
|
| 21 | } |
||
| 22 | |||
| 23 | 2 | return new static($errorMessage, 100, 'access_token_duplicate', 500); |
|
| 24 | } |
||
| 25 | } |
||
| 26 |