Passed
Push — master ( 904589...078d26 )
by Thomas Mauro
02:52
created

AbstractTLS   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

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