Skip to content

Commit

Permalink
Fix PHP 8.4 deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Aug 2, 2024
1 parent 61e9332 commit 1a64db8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public function __construct(
$streamOrFile,
int $size,
int $error,
string $clientFilename = null,
string $clientMediaType = null
?string $clientFilename = null,
?string $clientMediaType = null
) {
if (!array_key_exists($error, self::ERRORS)) {
throw new InvalidArgumentException(sprintf(
Expand Down
6 changes: 3 additions & 3 deletions src/UploadedFileFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ final class UploadedFileFactory implements UploadedFileFactoryInterface
*/
public function createUploadedFile(
StreamInterface $stream,
int $size = null,
?int $size = null,
int $error = UPLOAD_ERR_OK,
string $clientFilename = null,
string $clientMediaType = null
?string $clientFilename = null,
?string $clientMediaType = null
): UploadedFileInterface {
$size = (int) ($size === null ? $stream->getSize() : $size);
return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
Expand Down

0 comments on commit 1a64db8

Please sign in to comment.