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 ( ae5fa7...163d7c )
by Cees-Jan
10:38 queued 08:37
created

HydrateTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

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 ApiClients\Foundation\Resource;
5
6
use function Clue\React\Block\await;
7
use ApiClients\Foundation\Transport\Client;
8
9
trait HydrateTrait
10
{
11
    /**
12
     * @return Client
13
     */
14
    abstract protected function getTransport(): Client;
15
16
    /**
17
     * @param string $class
18
     * @param array $json
19
     * @return ResourceInterface
20
     */
21 1
    protected function hydrate(string $class, array $json): ResourceInterface
22
    {
23 1
        return $this->getTransport()->getHydrator()->hydrate($class, $json);
24
    }
25
}
26