| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function extractMessage($object, $languageIso) |
||
| 33 | { |
||
| 34 | if (!$object instanceof GameResult) { |
||
| 35 | return null; |
||
| 36 | } |
||
| 37 | |||
| 38 | foreach ($this->gameResultExtractors as $extractor) { |
||
| 39 | if ($message = $extractor->extractMessage($object, $languageIso)) { |
||
| 40 | return $message; |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | throw new \InvalidArgumentException('Unsupported Game Result'); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |