| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Arcanesoft\Media\Entities; |
||
| 11 | class MediaCollection |
||
| 12 | { |
||
| 13 | /* ----------------------------------------------------------------- |
||
| 14 | | Main Methods |
||
| 15 | | ----------------------------------------------------------------- |
||
| 16 | */ |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Get all the directories items. |
||
| 20 | * |
||
| 21 | * @param array $directories |
||
| 22 | * |
||
| 23 | * @return \Illuminate\Support\Collection |
||
| 24 | */ |
||
| 25 | public static function directories(array $directories) |
||
| 26 | { |
||
| 27 | return Collection::make($directories)->mapInto(DirectoryItem::class); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get all the files items. |
||
| 32 | * |
||
| 33 | * @param array $files |
||
| 34 | * |
||
| 35 | * @return \Illuminate\Support\Collection |
||
| 36 | */ |
||
| 37 | public static function files(array $files) |
||
| 38 | { |
||
| 39 | return Collection::make($files)->mapInto(FileItem::class); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get all the items. |
||
| 44 | * |
||
| 45 | * @param array $directories |
||
| 46 | * @param array $files |
||
| 47 | * |
||
| 48 | * @return \Illuminate\Support\Collection |
||
| 49 | */ |
||
| 50 | public static function all(array $directories, array $files) |
||
| 56 | } |
||
| 57 | } |
||
| 58 |