| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 23 | public function forVisitor(VisitorId $visitor): AccountOverview |
||
| 24 | { |
||
| 25 | foreach ($this->accounts as $accountOverview) { |
||
| 26 | if ($visitor->is($accountOverview->visitor())) { |
||
| 27 | return $accountOverview; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | throw NoAccountForVisitor::withId($visitor); |
||
| 31 | } |
||
| 33 |