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.
Completed
Push — master ( 1941f2...1385c1 )
by Cees-Jan
01:57
created

HydrateTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 9
ccs 2
cts 2
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
getTransport() 0 1 ?
A hydrate() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace WyriHaximus\ApiClient\Resource;
5
6
use function Clue\React\Block\await;
7
use WyriHaximus\ApiClient\Transport\Client;
8
9
trait HydrateTrait
10
{
11
    abstract protected function getTransport(): Client;
12
13 1
    protected function hydrate(string $class, array $json): ResourceInterface
14
    {
15 1
        return $this->getTransport()->getHydrator()->hydrate($class, $json);
16
    }
17
}
18