Completed
Push — master ( b3457c...c694d9 )
by Phil
02:30
created

StrategyAwareTrait::getStrategy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace League\Route\Strategy;
4
5
trait StrategyAwareTrait
6
{
7
    /**
8
     * @var \League\Route\Strategy\StrategyInterface
9
     */
10
    protected $strategy;
11
12
    /**
13
     * {@inheritdoc}
14
     */
15 32
    public function setStrategy(StrategyInterface $strategy) : StrategyAwareInterface
16
    {
17 32
        $this->strategy = $strategy;
18
19 32
        return $this;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 34
    public function getStrategy() : ?StrategyInterface
26
    {
27 34
        return $this->strategy;
28
    }
29
}
30