Explorer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A explore() 0 4 1
1
<?php
2
namespace Aeq\Hal;
3
4
use Aeq\Hal\Client\ClientAdapterAware;
5
use Aeq\Hal\Explorer\Resource as HalResource;
6
use Aeq\Hal\Explorer\ResourceCollection;
7
use Aeq\Hal\Explorer\ResourceFactory;
8
use Aeq\Hal\Serializer\SerializeAware;
9
use Psr\Http\Message\ResponseInterface;
10
11
class Explorer
12
{
13
    use SerializeAware;
14
    use ClientAdapterAware;
15
16
    /**
17
     * @param ResponseInterface $response
18
     * @return HalResource|ResourceCollection
19
     */
20 5
    public function explore(ResponseInterface $response)
21
    {
22 5
        return ResourceFactory::create($this, $this->deserialize($response->getBody()));
23
    }
24
}
25