Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
17 | 3 | public function process(ListDirectionsRequest $request,ListDirectionsResponse $response){ |
|
18 | 3 | $directions = $this->directionRepository->findAll(); |
|
19 | 3 | foreach($directions as $direction){ |
|
20 | 3 | $directionView = new DirectionView($direction); |
|
21 | 3 | if($request->getDirection() === $direction->getName()){ |
|
22 | 1 | $directionView->select(); |
|
23 | 1 | } |
|
24 | 3 | $response->addDirection($directionView); |
|
25 | 3 | } |
|
26 | |||
27 | } |
||
28 | } |