Skip to content

Commit 35ffc4e

Browse files
authored
Fix PHP 8.4 deprecation notices (#34)
1 parent 61e9332 commit 35ffc4e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/UploadedFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public function __construct(
104104
$streamOrFile,
105105
int $size,
106106
int $error,
107-
string $clientFilename = null,
108-
string $clientMediaType = null
107+
?string $clientFilename = null,
108+
?string $clientMediaType = null
109109
) {
110110
if (!array_key_exists($error, self::ERRORS)) {
111111
throw new InvalidArgumentException(sprintf(

src/UploadedFileFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ final class UploadedFileFactory implements UploadedFileFactoryInterface
1717
*/
1818
public function createUploadedFile(
1919
StreamInterface $stream,
20-
int $size = null,
20+
?int $size = null,
2121
int $error = UPLOAD_ERR_OK,
22-
string $clientFilename = null,
23-
string $clientMediaType = null
22+
?string $clientFilename = null,
23+
?string $clientMediaType = null
2424
): UploadedFileInterface {
2525
$size = (int) ($size === null ? $stream->getSize() : $size);
2626
return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);

0 commit comments

Comments
 (0)