| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 22 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 20 | public function extractMessage($object, $languageIso)  | 
            ||
| 21 |     { | 
            ||
| 22 | // TODO retrieve and translate the message / remove getAsMessage  | 
            ||
| 23 | |||
| 24 |         if ($object instanceof GameResult) { | 
            ||
| 25 | return $object->getAsMessage();  | 
            ||
| 26 | }  | 
            ||
| 27 | |||
| 28 |         if ($object instanceof UnableToCreateUserEvent) { | 
            ||
| 29 | return $object->getReason();  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 |         if ($object instanceof UserEvent) { | 
            ||
| 33 | return $object->getAsMessage();  | 
            ||
| 34 | }  | 
            ||
| 35 | |||
| 36 |         if ($object instanceof MessageParserException) { | 
            ||
| 37 | return $object->getMessage();  | 
            ||
| 38 | }  | 
            ||
| 39 | |||
| 40 | return null;  | 
            ||
| 41 | }  | 
            ||
| 42 | }  | 
            ||
| 43 |