diff --git a/src/Http/FileUpload.php b/src/Http/FileUpload.php index eeae28cf..bd748d5e 100644 --- a/src/Http/FileUpload.php +++ b/src/Http/FileUpload.php @@ -246,7 +246,7 @@ public function toImage(): Image /** * Returns the [width, height] dimensions of the uploaded image, or null if it is not a valid image. - * @return ?array{int, int} + * @return ?array{int<0, max>, int<0, max>} */ public function getImageSize(): ?array { diff --git a/tests/types/http-types.php b/tests/types/http-types.php index dedc179f..01bf05c6 100644 --- a/tests/types/http-types.php +++ b/tests/types/http-types.php @@ -29,5 +29,5 @@ function testSessionSectionArrayAccess(SessionSection $section): void function testFileUploadGetImageSize(FileUpload $upload): void { $size = $upload->getImageSize(); - assertType('array{int, int}|null', $size); + assertType('array{int<0, max>, int<0, max>}|null', $size); }