StaticProvider::saveAuthorization()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 4
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\OAuth2\HttpClient\Authorization;
6
7
use Facile\OAuth2\HttpClient\Request\OAuth2RequestInterface;
8
use Facile\OpenIDClient\Client\ClientInterface;
9
10
class StaticProvider implements AuthorizationProvider
11
{
12
    /** @var string */
13
    private $authorization;
14
15 1
    public function __construct(string $authorization)
16
    {
17 1
        $this->authorization = $authorization;
18 1
    }
19
20 1
    public function getAuthorization(ClientInterface $client, OAuth2RequestInterface $request): ?string
21
    {
22 1
        return $this->authorization;
23
    }
24
25
    public function saveAuthorization(
26
        ClientInterface $client,
27
        OAuth2RequestInterface $request,
28
        string $authorization,
29
        ?int $ttl = null
30
    ): void {
31
    }
32
}
33