File tree Expand file tree Collapse file tree 8 files changed +24
-23
lines changed Expand file tree Collapse file tree 8 files changed +24
-23
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public function isFirstChunk()
125125 /**
126126 * Checks if the chunk is last.
127127 *
128- * @return int
128+ * @return bool
129129 */
130130 public function isLastChunk ()
131131 {
Original file line number Diff line number Diff line change @@ -36,21 +36,21 @@ class ContentRangeUploadHandler extends AbstractHandler
3636 /**
3737 * Current chunk start bytes.
3838 *
39- * @var int
39+ * @var float
4040 */
4141 protected $ bytesStart = 0 ;
4242
4343 /**
4444 * Current chunk bytes end.
4545 *
46- * @var int
46+ * @var float
4747 */
4848 protected $ bytesEnd = 0 ;
4949
5050 /**
5151 * The files total bytes.
5252 *
53- * @var int
53+ * @var float
5454 */
5555 protected $ bytesTotal = 0 ;
5656
@@ -153,7 +153,7 @@ public function isFirstChunk()
153153 /**
154154 * Returns the chunks count.
155155 *
156- * @return int
156+ * @return bool
157157 */
158158 public function isLastChunk ()
159159 {
@@ -172,23 +172,23 @@ public function isChunkedUpload()
172172 }
173173
174174 /**
175- * @return int returns the starting bytes for current request
175+ * @return float returns the starting bytes for current request
176176 */
177177 public function getBytesStart ()
178178 {
179179 return $ this ->bytesStart ;
180180 }
181181
182182 /**
183- * @return int returns the ending bytes for current request
183+ * @return float returns the ending bytes for current request
184184 */
185185 public function getBytesEnd ()
186186 {
187187 return $ this ->bytesEnd ;
188188 }
189189
190190 /**
191- * @return int returns the total bytes for the file
191+ * @return float returns the total bytes for the file
192192 */
193193 public function getBytesTotal ()
194194 {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class HandlerFactory
3737 */
3838 public static function classFromRequest (Request $ request , $ fallbackClass = null )
3939 {
40- /** @var AbstractHandler $handlerClass */
40+ /** @var AbstractHandler|string $handlerClass */
4141 foreach (static ::$ handlers as $ handlerClass ) {
4242 if ($ handlerClass ::canBeUsedForRequest ($ request )) {
4343 return $ handlerClass ;
Original file line number Diff line number Diff line change 22
33namespace Pion \Laravel \ChunkUpload \Handler ;
44
5- use Pion \Laravel \ChunkUpload \Config \AbstractConfig ;
65use Pion \Laravel \ChunkUpload \Save \SingleSave ;
76use Pion \Laravel \ChunkUpload \Storage \ChunkStorage ;
87
@@ -16,7 +15,7 @@ class SingleUploadHandler extends AbstractHandler
1615 /**
1716 * Returns the chunks ave instance for saving.
1817 *
19- * @param ChunkStorage $chunkStorage the chunk storage
18+ * @param ChunkStorage $chunkStorage the chunk storage
2019 *
2120 * @return SingleSave
2221 */
@@ -32,7 +31,7 @@ public function startSaving($chunkStorage)
3231 */
3332 public function getChunkFileName ()
3433 {
35- return null ; // never used
34+ return '' ; // never used
3635 }
3736
3837 /**
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class FileReceiver
2525 protected $ file ;
2626
2727 /**
28- * The handler that detects what upload proccess is beeing used.
28+ * The handler that detects what upload process is being used.
2929 *
3030 * @var AbstractHandler
3131 */
@@ -93,7 +93,7 @@ public function isUploaded()
9393 */
9494 public function receive ()
9595 {
96- if (false === is_object ($ this ->handler )) {
96+ if (false == is_object ($ this ->handler )) {
9797 return false ;
9898 }
9999
Original file line number Diff line number Diff line change 22
33namespace Pion \Laravel \ChunkUpload \Save ;
44
5+ use Illuminate \Contracts \Filesystem \Filesystem as FilesystemContract ;
56use Illuminate \Http \UploadedFile ;
67use Pion \Laravel \ChunkUpload \Config \AbstractConfig ;
78use Pion \Laravel \ChunkUpload \Exceptions \ChunkSaveException ;
@@ -154,7 +155,7 @@ protected function handleChunk()
154155 $ file = $ this ->getChunkFilePath ();
155156
156157 $ this ->handleChunkFile ($ file )
157- ->tryToBuildFullFileFromChunks ();
158+ ->tryToBuildFullFileFromChunks ();
158159 }
159160
160161 /**
@@ -242,7 +243,7 @@ public function chunkStorage()
242243 /**
243244 * Returns the disk adapter for the chunk.
244245 *
245- * @return \Illuminate\Filesystem\FilesystemAdapter
246+ * @return FilesystemContract
246247 */
247248 public function chunkDisk ()
248249 {
Original file line number Diff line number Diff line change 33namespace Pion \Laravel \ChunkUpload \Save ;
44
55use Illuminate \Http \UploadedFile ;
6+ use Illuminate \Support \Collection ;
67use Illuminate \Support \Str ;
78use Pion \Laravel \ChunkUpload \ChunkFile ;
89use Pion \Laravel \ChunkUpload \Config \AbstractConfig ;
@@ -31,10 +32,10 @@ class ParallelSave extends ChunkSave
3132 /**
3233 * ParallelSave constructor.
3334 *
34- * @param UploadedFile $file the uploaded file (chunk file)
35- * @param AbstractHandler|HandleParallelUploadTrait $handler the handler that detected the correct save method
36- * @param ChunkStorage $chunkStorage the chunk storage
37- * @param AbstractConfig $config the config manager
35+ * @param UploadedFile $file the uploaded file (chunk file)
36+ * @param AbstractHandler $handler the handler that detected the correct save method
37+ * @param ChunkStorage $chunkStorage the chunk storage
38+ * @param AbstractConfig $config the config manager
3839 *
3940 * @throws ChunkSaveException
4041 */
@@ -79,7 +80,7 @@ protected function tryToBuildFullFileFromChunks()
7980 /**
8081 * Searches for all chunk files.
8182 *
82- * @return \Illuminate\Support\ Collection
83+ * @return Collection
8384 */
8485 protected function getSavedChunksFiles ()
8586 {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public static function storage()
3232 /**
3333 * The disk that holds the chunk files.
3434 *
35- * @var \Illuminate\Filesystem\FilesystemAdapter
35+ * @var FilesystemContract
3636 */
3737 protected $ disk ;
3838
@@ -172,7 +172,7 @@ public function config()
172172 }
173173
174174 /**
175- * @return \Illuminate\Filesystem\FilesystemAdapter
175+ * @return FilesystemContract
176176 */
177177 public function disk ()
178178 {
You can’t perform that action at this time.
0 commit comments