| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 1 | public function allWithStatus() |
|
| 26 | { |
||
| 27 | 1 | $stations = $this->all(); |
|
| 28 | 1 | $statuses = $this->statuses(); |
|
| 29 | |||
| 30 | $stationsWithStatus = $stations->map(function ($station) use ($statuses) { |
||
| 31 | 1 | $station->setStatus(collect($statuses)->firstWhere('id', $station->id)); |
|
| 32 | 1 | return $station; |
|
| 33 | 1 | }); |
|
| 34 | |||
| 35 | 1 | return $stationsWithStatus; |
|
| 36 | } |
||
| 43 |