Api::__call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 2
crap 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