Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
15 | public function get(array $matchInfos) : array |
||
16 | { |
||
17 | $resultGames = []; |
||
18 | foreach ($matchInfos as $matchInfo) { |
||
19 | $homeTeam = $matchInfo['home_team']; |
||
20 | $awayTeam = $matchInfo['away_team']; |
||
21 | $resultGames[] = new GameResult( |
||
22 | $homeTeam['country'], |
||
23 | $awayTeam['country'], |
||
24 | (int)$homeTeam['goals'], |
||
25 | (int)$awayTeam['goals'] |
||
26 | ); |
||
27 | } |
||
28 | return $resultGames; |
||
29 | } |
||
30 | } |