Completed
Push — master ( d5f163...f917da )
by Iacovos
9s
created

CallableResolver   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 3
c 3
b 0
f 2
lcom 0
cbo 2
dl 0
loc 32
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A resolve() 0 4 1
A resolveSafe() 0 4 1
1
<?php
2
3
namespace Softius\ResourcesResolver;
4
5
/**
6
 * Class CallableResolver.
7
 */
8
class CallableResolver implements StrategyAwareInterface
9
{
10
    use StrategyAwareTrait;
11
12
    /**
13
     * CallableResolver constructor.
14
     */
15 8
    public function __construct()
16
    {
17 8
        $this->setStrategy(new DefaultCallableStrategy());
18 8
    }
19
20
    /**
21
     * @param string $in
22
     *
23
     * @return mixed
24
     */
25 5
    public function resolve($in)
26
    {
27 5
        return $this->getStrategy()->resolve($in);
28
    }
29
30
    /**
31
     * @param string $in
32
     *
33
     * @return mixed
34
     */
35 3
    public function resolveSafe($in)
36
    {
37 3
        return $this->getStrategy()->resolveSafe($in);
38
    }
39
}
40