UnauthorizedClientException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace kalanis\OAuth2\Exceptions;
4
5
6
use Exception;
7
8
9
/**
10
 * UnauthorizedClientException
11
 * @package kalanis\OAuth2\Exceptions
12
 */
13 1
class UnauthorizedClientException extends OAuthException
14
{
15
16
    protected string $key = 'unauthorized_client';
17
18
19
    /**
20
     * @param string $message
21
     * @param Exception|null $previous
22
     */
23
    public function __construct($message = 'The grant type is not authorized for this client', Exception $previous = null)
24
    {
25 1
        parent::__construct($message, 401, $previous);
26 1
    }
27
}
28