Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | trait ImageUploadEntity |
||
12 | { |
||
13 | /** |
||
14 | * Image instance |
||
15 | */ |
||
16 | protected Image $image; |
||
17 | |||
18 | protected LaruploadImageLibrary $imageProcessingLibrary; |
||
19 | |||
20 | |||
21 | protected function img(UploadedFile $file): Image |
||
22 | { |
||
23 | $this->image = new Image( |
||
24 | file: $file, |
||
25 | disk: $this->disk, |
||
26 | library: $this->imageProcessingLibrary, |
||
27 | dominantColorQuality: $this->dominantColorQuality |
||
28 | ); |
||
29 | |||
30 | return $this->image; |
||
31 | } |
||
32 | |||
33 | public function imageProcessingLibrary(LaruploadImageLibrary $library): UploadEntities |
||
38 | } |
||
39 | } |
||
40 |