None   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSupportedMethod() 0 3 1
A createRequest() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\OpenIDClient\AuthMethod;
6
7
use function array_merge;
8
use Facile\OpenIDClient\Client\ClientInterface as OpenIDClient;
9
use function http_build_query;
10
use Psr\Http\Message\RequestInterface;
11
12
final class None implements AuthMethodInterface
13
{
14 2
    public function getSupportedMethod(): string
15
    {
16 2
        return 'none';
17
    }
18
19 1
    public function createRequest(
20
        RequestInterface $request,
21
        OpenIDClient $client,
22
        array $claims
23
    ): RequestInterface {
24 1
        $params = array_merge(['client_id' => $client->getMetadata()->getClientId()], $claims);
25 1
        $request->getBody()->write(http_build_query($params));
26
27 1
        return $request;
28
    }
29
}
30