Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function transform(Transaction $item) |
||
19 | { |
||
20 | return [ |
||
21 | 'ID' => $item->id, |
||
22 | 'Date' => $item->date, |
||
23 | 'Account' => $item->account_name, |
||
24 | 'ToAccount' => $item->to_account_name, |
||
25 | 'Status' => $item->status->slug, |
||
26 | 'Type' => $item->type->name, |
||
27 | 'Payee' => $item->payee_name, |
||
28 | 'Category' => $item->category_name, |
||
29 | 'SubCategory' => $item->sub_category_name, |
||
30 | 'Amount' => (string)floatval($item->amount), |
||
31 | 'Notes' => $item->notes, |
||
32 | 'Attachments' => $item->getMedia('attachments') |
||
33 | ->map(function (Media $mediaItem) { |
||
34 | return $mediaItem->file_name; |
||
35 | })->implode(';'),]; |
||
36 | } |
||
37 | } |
||
38 |