Api   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 20
ccs 9
cts 9
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __call() 0 3 1
A __construct() 0 5 1
A originalClient() 0 3 1
1
<?php
2
3
namespace GoCardlessPayment;
4
5
use GoCardlessPro\Client;
6
7
/**
8
 * @extends Client
9
 */
10
class Api
11
{
12
    protected Client $client;
13
14 1
    public function __construct(string $accessToken, string $environment)
15
    {
16 1
        $this->client = new Client([
17 1
            'access_token' => $accessToken,
18 1
            'environment' => $environment,
19 1
        ]);
20
    }
21
22 1
    public function originalClient(): Client
23
    {
24 1
        return $this->client;
25
    }
26
27 1
    public function __call($method, $parameters)
28
    {
29 1
        return $this->client->{$method}(...$parameters);
30
    }
31
}
32