| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function transform($data) |
||
| 17 | { |
||
| 18 | $obj = [ |
||
| 19 | 'id' => (string) $data->character_id, // Bigint |
||
| 20 | 'name' => (string) $data->name->first, |
||
| 21 | 'faction' => (int) $data->faction_id, |
||
| 22 | 'br' => (int) $data->battle_rank->value, |
||
| 23 | 'outfit' => null, |
||
| 24 | 'server' => (int) $data->world_id, |
||
| 25 | 'environment' => (string) $data->environment, |
||
| 26 | 'entered' => (int) date('U') |
||
| 27 | ]; |
||
| 28 | |||
| 29 | if (isset($data->outfit)) { |
||
| 30 | $obj['outfit'] = $data->outfit->outfit_id; |
||
| 31 | } |
||
| 32 | |||
| 33 | return $obj; |
||
| 34 | } |
||
| 35 | } |
||
| 36 |