← All changes
|
includes/sdk/s3/Psr/Http/Message/UploadedFileInterface.php
+6
-6
1.2.10
→
1.4.1
View file →
| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | * @return StreamInterface Stream representation of the uploaded file. |
| 28 | 28 | * @throws \RuntimeException in cases when no stream is available or can be |
| 29 | 29 | * created. |
| 30 | 30 | */ |
| 31 | - public function getStream(); | |
| 31 | + public function getStream() : StreamInterface; | |
| 32 | 32 | /** |
| 33 | 33 | * Move the uploaded file to a new location. |
| 34 | 34 | * |
| 35 | 35 | * Use this method as an alternative to move_uploaded_file(). This method is |
| @@ -60,9 +60,9 @@ | ||
| 60 | 60 | * @throws \InvalidArgumentException if the $targetPath specified is invalid. |
| 61 | 61 | * @throws \RuntimeException on any error during the move operation, or on |
| 62 | 62 | * the second or subsequent call to the method. |
| 63 | 63 | */ |
| 64 | - public function moveTo($targetPath); | |
| 64 | + public function moveTo(string $targetPath) : void; | |
| 65 | 65 | /** |
| 66 | 66 | * Retrieve the file size. |
| 67 | 67 | * |
| 68 | 68 | * Implementations SHOULD return the value stored in the "size" key of |
| @@ -70,9 +70,9 @@ | ||
| 70 | 70 | * on the actual size transmitted. |
| 71 | 71 | * |
| 72 | 72 | * @return int|null The file size in bytes or null if unknown. |
| 73 | 73 | */ |
| 74 | - public function getSize(); | |
| 74 | + public function getSize() : ?int; | |
| 75 | 75 | /** |
| 76 | 76 | * Retrieve the error associated with the uploaded file. |
| 77 | 77 | * |
| 78 | 78 | * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants. |
| @@ -85,9 +85,9 @@ | ||
| 85 | 85 | * |
| 86 | 86 | * @see http://php.net/manual/en/features.file-upload.errors.php |
| 87 | 87 | * @return int One of PHP's UPLOAD_ERR_XXX constants. |
| 88 | 88 | */ |
| 89 | - public function getError(); | |
| 89 | + public function getError() : int; | |
| 90 | 90 | /** |
| 91 | 91 | * Retrieve the filename sent by the client. |
| 92 | 92 | * |
| 93 | 93 | * Do not trust the value returned by this method. A client could send |
| @@ -99,9 +99,9 @@ | ||
| 99 | 99 | * |
| 100 | 100 | * @return string|null The filename sent by the client or null if none |
| 101 | 101 | * was provided. |
| 102 | 102 | */ |
| 103 | - public function getClientFilename(); | |
| 103 | + public function getClientFilename() : ?string; | |
| 104 | 104 | /** |
| 105 | 105 | * Retrieve the media type sent by the client. |
| 106 | 106 | * |
| 107 | 107 | * Do not trust the value returned by this method. A client could send |
| @@ -113,6 +113,6 @@ | ||
| 113 | 113 | * |
| 114 | 114 | * @return string|null The media type sent by the client or null if none |
| 115 | 115 | * was provided. |
| 116 | 116 | */ |
| 117 | - public function getClientMediaType(); | |
| 117 | + public function getClientMediaType() : ?string; | |
| 118 | 118 | } |