StrategyAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setStrategy() 0 6 1
A getStrategy() 0 4 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