@@ -47,7 +47,7 @@ |
||
47 | 47 | * |
48 | 48 | * @param string $name |
49 | 49 | * |
50 | - * @return mixed |
|
50 | + * @return Conversion |
|
51 | 51 | * |
52 | 52 | * @throws \Spatie\MediaLibrary\Exceptions\InvalidConversion |
53 | 53 | */ |
@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | $this->filesystem = $filesystem; |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $targetFileName |
|
28 | + */ |
|
26 | 29 | public function add(string $file, Media $media, ?string $targetFileName = null) |
27 | 30 | { |
28 | 31 | $this->copyToMediaLibrary($file, $media, null, $targetFileName); |
@@ -32,6 +35,9 @@ discard block |
||
32 | 35 | app(FileManipulator::class)->createDerivedFiles($media); |
33 | 36 | } |
34 | 37 | |
38 | + /** |
|
39 | + * @param string $type |
|
40 | + */ |
|
35 | 41 | public function copyToMediaLibrary(string $pathToFile, Media $media, ?string $type = null, ?string $targetFileName = null) |
36 | 42 | { |
37 | 43 | $destinationFileName = $targetFileName ?: pathinfo($pathToFile, PATHINFO_BASENAME); |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * Clear the media's entire media collection. |
81 | 81 | * |
82 | - * @param null $model |
|
83 | - * @param \Spatie\MediaLibrary\Models\Media[]|\Illuminate\Support\Collection $excludedMedia |
|
82 | + * @param HasMedia|null $model |
|
83 | + * @param Media $excludedMedia |
|
84 | 84 | * @return $this |
85 | 85 | */ |
86 | 86 | public function clearMediaCollection($model = null, $excludedMedia = []) |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | |
284 | 284 | /** |
285 | 285 | * @param string $name |
286 | - * @param mixed $value |
|
286 | + * @param boolean $value |
|
287 | 287 | * |
288 | 288 | * @return $this |
289 | 289 | */ |