Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | 4 | public function getByTargetDestination(TargetDefinitionInterface $target, DestinationInterface $destination = null) |
|
23 | { |
||
24 | 4 | if (!array_key_exists($target->getRoute(), $this->pages)) { |
|
25 | 1 | throw PageException::notFound($target); |
|
26 | } |
||
27 | |||
28 | 3 | return $this->pages[$target->getRoute()]; |
|
29 | } |
||
30 | } |
||
31 |