← All changes
|
vendor/psr/http-message/src/UploadedFileInterface.php
+6
-8
5.7.2
→
6.3.0
View file →
| @@ -1,8 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); | |
| 4 | - | |
| 5 | 3 | namespace Psr\Http\Message; |
| 6 | 4 | |
| 7 | 5 | /** |
| 8 | 6 | * Value object representing a file uploaded through an HTTP request. |
| @@ -29,9 +27,9 @@ | ||
| 29 | 27 | * @return StreamInterface Stream representation of the uploaded file. |
| 30 | 28 | * @throws \RuntimeException in cases when no stream is available or can be |
| 31 | 29 | * created. |
| 32 | 30 | */ |
| 33 | - public function getStream(); | |
| 31 | + public function getStream(): StreamInterface; | |
| 34 | 32 | |
| 35 | 33 | /** |
| 36 | 34 | * Move the uploaded file to a new location. |
| 37 | 35 | * |
| @@ -63,9 +61,9 @@ | ||
| 63 | 61 | * @throws \InvalidArgumentException if the $targetPath specified is invalid. |
| 64 | 62 | * @throws \RuntimeException on any error during the move operation, or on |
| 65 | 63 | * the second or subsequent call to the method. |
| 66 | 64 | */ |
| 67 | - public function moveTo(string $targetPath); | |
| 65 | + public function moveTo(string $targetPath): void; | |
| 68 | 66 | |
| 69 | 67 | /** |
| 70 | 68 | * Retrieve the file size. |
| 71 | 69 | * |
| @@ -74,9 +72,9 @@ | ||
| 74 | 72 | * on the actual size transmitted. |
| 75 | 73 | * |
| 76 | 74 | * @return int|null The file size in bytes or null if unknown. |
| 77 | 75 | */ |
| 78 | - public function getSize(); | |
| 76 | + public function getSize(): ?int; | |
| 79 | 77 | |
| 80 | 78 | /** |
| 81 | 79 | * Retrieve the error associated with the uploaded file. |
| 82 | 80 | * |
| @@ -90,9 +88,9 @@ | ||
| 90 | 88 | * |
| 91 | 89 | * @see http://php.net/manual/en/features.file-upload.errors.php |
| 92 | 90 | * @return int One of PHP's UPLOAD_ERR_XXX constants. |
| 93 | 91 | */ |
| 94 | - public function getError(); | |
| 92 | + public function getError(): int; | |
| 95 | 93 | |
| 96 | 94 | /** |
| 97 | 95 | * Retrieve the filename sent by the client. |
| 98 | 96 | * |
| @@ -105,9 +103,9 @@ | ||
| 105 | 103 | * |
| 106 | 104 | * @return string|null The filename sent by the client or null if none |
| 107 | 105 | * was provided. |
| 108 | 106 | */ |
| 109 | - public function getClientFilename(); | |
| 107 | + public function getClientFilename(): ?string; | |
| 110 | 108 | |
| 111 | 109 | /** |
| 112 | 110 | * Retrieve the media type sent by the client. |
| 113 | 111 | * |
| @@ -120,6 +118,6 @@ | ||
| 120 | 118 | * |
| 121 | 119 | * @return string|null The media type sent by the client or null if none |
| 122 | 120 | * was provided. |
| 123 | 121 | */ |
| 124 | - public function getClientMediaType(); | |
| 122 | + public function getClientMediaType(): ?string; | |
| 125 | 123 | } |