Client   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 4
eloc 4
dl 0
loc 24
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getRedirectUrl() 0 3 1
A __construct() 0 6 1
A getSecret() 0 3 1
1
<?php
2
3
namespace kalanis\OAuth2\Storage\Clients;
4
5
6
/**
7
 * OAuth2 base client caret
8
 * @package kalanis\OAuth2\Storage\Clients
9
 */
10 1
class Client implements IClient
11
{
12
13 1
    public function __construct(
14
        private readonly string|int $id,
15
        #[\SensitiveParameter] private readonly string $secret,
16
        private readonly string $redirectUrl,
17
    )
18
    {
19 1
    }
20
21
    public function getId(): string|int
22
    {
23 1
        return $this->id;
24
    }
25
26
    public function getRedirectUrl(): string
27
    {
28
        return $this->redirectUrl;
29
    }
30
31
    public function getSecret(): string
32
    {
33 1
        return $this->secret;
34
    }
35
}
36