@@ -26,7 +26,7 @@ public function field(string|array|null $field, bool $checkOwnership = true)
2626 /**
2727 * Return file object from the field
2828 *
29- * @return array| \Illuminate\Http\UploadedFile
29+ * @return \Illuminate\Http\UploadedFile|array<int, \Illuminate\Http\UploadedFile>|null
3030 */
3131 public function getFile ()
3232 {
@@ -47,7 +47,7 @@ public function getFile()
4747 * Get the filepond file as Data URL string
4848 * More at - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
4949 *
50- * @return array|string
50+ * @return array|array<int, string>|null
5151 *
5252 * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
5353 */
@@ -79,7 +79,25 @@ public function getModel()
7979 /**
8080 * Copy the FilePond files to destination
8181 *
82- * @return array
82+ * @return array{
83+ * id: int,
84+ * dirname: string,
85+ * basename: string,
86+ * extension: string,
87+ * mimetype: string,
88+ * filename: string,
89+ * location: string,
90+ * url: string
91+ * }|array<int, array{
92+ * id: int,
93+ * dirname: string,
94+ * basename: string,
95+ * extension: string,
96+ * mimetype: string,
97+ * filename: string,
98+ * location: string,
99+ * url: string
100+ * }>|null
83101 *
84102 * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
85103 */
@@ -108,7 +126,25 @@ public function copyTo(string $path, string $disk = '', string $visibility = '')
108126 /**
109127 * Copy the FilePond files to destination and delete
110128 *
111- * @return array
129+ * @return array{
130+ * id: int,
131+ * dirname: string,
132+ * basename: string,
133+ * extension: string,
134+ * mimetype: string,
135+ * filename: string,
136+ * location: string,
137+ * url: string
138+ * }|array<int, array{
139+ * id: int,
140+ * dirname: string,
141+ * basename: string,
142+ * extension: string,
143+ * mimetype: string,
144+ * filename: string,
145+ * location: string,
146+ * url: string
147+ * }>|null
112148 *
113149 * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
114150 */
@@ -145,7 +181,7 @@ public function moveTo(string $path, string $disk = '', string $visibility = '')
145181 public function delete ()
146182 {
147183 if (! $ this ->getFieldValue ()) {
148- return null ;
184+ return ;
149185 }
150186
151187 if ($ this ->getIsMultipleUpload ()) {
@@ -174,7 +210,16 @@ public function delete()
174210 /**
175211 * Put the file in permanent storage and return response
176212 *
177- * @return array
213+ * @return array{
214+ * id: int,
215+ * dirname: string,
216+ * basename: string,
217+ * extension: string,
218+ * mimetype: string,
219+ * filename: string,
220+ * location: string,
221+ * url: string
222+ * }
178223 *
179224 * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
180225 */
@@ -187,7 +232,7 @@ private function putFile(FilepondModel $filepond, string $path, string $disk, st
187232 Storage::disk ($ permanentDisk )->writeStream (
188233 $ pathInfo ['dirname ' ].DIRECTORY_SEPARATOR .$ pathInfo ['filename ' ].'. ' .$ filepond ->extension ,
189234 Storage::disk ($ this ->getTempDisk ())->readStream ($ filepond ->filepath ),
190- $ visibility !== '' ? ['visibility ' => $ visibility ] : [],
235+ $ visibility !== '' ? ['visibility ' => $ visibility ] : []
191236 );
192237
193238 return [
0 commit comments