Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 77.78% |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
14 | trait HasMediaTrait |
||
15 | { |
||
16 | use HasMediaRepositoryTrait; |
||
17 | use Traits\AddMediaTrait; |
||
18 | use Traits\HasMediaFilesystemTrait; |
||
19 | use Traits\HasMediaConversionsTrait; |
||
20 | use Traits\HasMediaPropertiesTrait; |
||
21 | use ImageShortcodes; |
||
22 | use FilesShortcodes; |
||
23 | |||
24 | /** |
||
25 | * Get media collection by its collectionName. |
||
26 | * |
||
27 | * @param string $collectionName |
||
28 | * @param array|callable $filters |
||
29 | * |
||
30 | * @return Collection |
||
31 | */ |
||
32 | 7 | public function getMedia(string $collectionName = 'default', $filters = []): Collection |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param MediaRepository $mediaRepository |
||
39 | * |
||
40 | * @return MediaRepository |
||
41 | */ |
||
42 | 7 | protected function hydrateMediaRepository($mediaRepository) |
|
57 |