| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | private static function _conditionDescription(Error $error) |
||
| 44 | { |
||
| 45 | if(!empty($error->text)) { |
||
| 46 | return $error->text; |
||
| 47 | } |
||
| 48 | |||
| 49 | return [ |
||
| 50 | 'bad-request' => 'Bad Request: "{resource}" is not valid XMPP resource identifier.', |
||
| 51 | 'conflict' => 'Conflict: {bare}/{resource} is already in use.' |
||
| 52 | ][$error->condition] ?? 'Unknown reason: '.$error->condition; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |