Completed
Push — master ( 24c89a...7da8a2 )
by n
02:26
created

DelegateResolver::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace N1215\Jugoya\Resolver;
4
5
use Interop\Http\ServerMiddleware\DelegateInterface;
6
use N1215\Jugoya\Wrapper\CallableDelegate;
7
8
class DelegateResolver extends ResolverAbstract implements DelegateResolverInterface
9
{
10
11
    /**
12
     * @param string|callable|DelegateInterface $ref
13
     * @return DelegateInterface
14
     * @throws UnresolvedException
15
     */
16 10
    public function resolve($ref)
17
    {
18 10
        return $this->resolveWithType($ref, DelegateInterface::class, CallableDelegate::class);
19
    }
20
}
21