Guzzle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A supports() 0 4 1
A hydrate() 0 4 1
1
<?php
2
3
namespace Shrikeh\PagerDuty\Hydrator\Uri;
4
5
use stdClass;
6
use GuzzleHttp\Psr7\Uri;
7
use Shrikeh\PagerDuty\Hydrator;
8
use Shrikeh\PagerDuty\Hydrator\Uri as UriHydrator;
9
10
final class Guzzle implements Hydrator, UriHydrator
11
{
12
    public function supports($key)
13
    {
14
        return 'self' === $key;
15
    }
16
17
    public function hydrate(stdClass $dto)
18
    {
19
        return new Uri($dto->self);
20
    }
21
}
22