| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | private function toFile($translations): string |
||
| 34 | { |
||
| 35 | $date = Carbon::now('Europe/Madrid')->format('dmY_His'); |
||
| 36 | $path = storage_path('app/translations/' . $date . '_excel.xlsx'); |
||
| 37 | |||
| 38 | return (new FastExcel(new SheetCollection($translations)))->export($path, function ($sheets) { |
||
| 39 | return [ |
||
| 40 | 'key1' => 'mage', |
||
| 41 | 'key2' => $sheets['key'], |
||
| 42 | 'value' => $sheets['value'] |
||
| 43 | ]; |
||
| 47 |