GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Client   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 4
dl 0
loc 46
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A create() 0 10 1
A overview() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiClients\Client\PiHole;
6
7
use ApiClients\Client\PiHole\Resource\OverviewInterface;
8
use ApiClients\Client\PiHole\Resource\Sync\Overview;
9
use ApiClients\Foundation\Factory as FoundationClientFactory;
10
use React\EventLoop\Factory;
11
use React\EventLoop\LoopInterface;
12
use function ApiClients\Tools\Rx\setAsyncScheduler;
13
use function Clue\React\Block\await;
14
15
final class Client implements ClientInterface
16
{
17
    /**
18
     * @var LoopInterface
19
     */
20
    private $loop;
21
    /**
22
     * @var AsyncClient
23
     */
24
    private $client;
25
26
    /**
27
     * @param LoopInterface $loop
28
     * @param AsyncClient   $client
29
     */
30
    private function __construct(LoopInterface $loop, AsyncClient $client)
31
    {
32
        $this->loop = $loop;
33
        $this->client = $client;
34
    }
35
36
    /**
37
     * @param  string $host
38
     * @param  array  $options
39
     * @return Client
40
     */
41
    public static function create(string $host, array $options = []): self
42
    {
43
        $loop = Factory::create();
44
        $options = ApiSettings::getOptions($host, $options, 'Sync');
45
        $client = FoundationClientFactory::create($loop, $options);
46
        setAsyncScheduler($loop);
47
        $asyncClient = AsyncClient::createFromClient($client);
48
49
        return new self($loop, $asyncClient);
50
    }
51
52
    /**
53
     * @param  string            $input
0 ignored issues
show
Bug introduced by
There is no parameter named $input. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
54
     * @return OverviewInterface
55
     */
56
    public function overview(): Overview
57
    {
58
        return await($this->client->overview(), $this->loop);
59
    }
60
}
61