Completed
Pull Request — 1.x (#187)
by Akihito
02:07
created

HttpAdapter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource;
6
7
use Ray\Di\InjectorInterface;
8
9
final class HttpAdapter implements AdapterInterface
10
{
11
    /**
12
     * @var InjectorInterface
13
     */
14
    private $injector;
15
16
    /**
17
     * @param InjectorInterface $injector Application dependency injector
18
     */
19
    public function __construct(InjectorInterface $injector)
20
    {
21
        $this->injector = $injector;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function get(AbstractUri $uri) : ResourceObject
0 ignored issues
show
Unused Code introduced by
The method parameter $uri is never used
Loading history...
28
    {
29
        return $this->injector->getInstance(HttpResourceObject::class);
30
    }
31
}
32