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 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 34
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A astronomy() 0 7 1
A conditions() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\WeatherUnderground;
4
5
use ApiClients\Client\WeatherUnderground\Resource\AstronomyInterface;
6
use ApiClients\Client\WeatherUnderground\Resource\ConditionInterface;
7
use ApiClients\Client\WeatherUnderground\Resource\UserInterface;
8
use React\EventLoop\Factory;
9
use React\EventLoop\LoopInterface;
10
use function Clue\React\Block\await;
11
12
final class Client
13
{
14
    /**
15
     * @var LoopInterface
16
     */
17
    private $loop;
18
19
    /**
20
     * @var AsyncClient
21
     */
22
    private $client;
23
24
    public function __construct(string $token)
25
    {
26
        $this->loop = Factory::create();
27
        $this->client = AsyncClient::create($this->loop, $token);
0 ignored issues
show
Documentation Bug introduced by
It seems like \ApiClients\Client\Weath...te($this->loop, $token) of type object<self> is incompatible with the declared type object<ApiClients\Client...nderground\AsyncClient> of property $client.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
28
    }
29
30
    public function astronomy(string $location): AstronomyInterface
31
    {
32
        return await(
33
            $this->client->astronomy($location),
34
            $this->loop
35
        );
36
    }
37
38
    public function conditions(string $location): ConditionInterface
39
    {
40
        return await(
41
            $this->client->conditions($location),
42
            $this->loop
43
        );
44
    }
45
}
46