Completed
Push — master ( 003b5e...76542b )
by Woody
38:06 queued 22:13
created

AurynResolver::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Equip\Resolver;
3
4
use Auryn\Injector;
5
use Relay\ResolverInterface;
6
7
class AurynResolver implements ResolverInterface
8
{
9
    /**
10
     * @var Injector
11
     */
12
    private $injector;
13
14 25
    public function __construct(Injector $injector)
15
    {
16 25
        $this->injector = $injector;
17 25
    }
18
19
    /**
20
     * Get an instance of the given class
21
     *
22
     * @param string $spec Fully-qualified class name
23
     *
24
     * @return object
25
     */
26 16
    public function __invoke($spec)
27
    {
28 16
        return $this->injector->make($spec);
29
    }
30
}
31