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

HttpAdapter::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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