Skip to content

Commit

Permalink
Fix php 8.4 deprecation notices (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
8ctopus authored Nov 25, 2024
1 parent 3d773c8 commit 3fe38a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/ServerRequestCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class ServerRequestCreator
* @param ServerNormalizerInterface|null $normalizer
* @return ServerRequestInterface
*/
public static function create(ServerNormalizerInterface $normalizer = null): ServerRequestInterface
public static function create(?ServerNormalizerInterface $normalizer = null): ServerRequestInterface
{
return self::createFromGlobals(null, null, null, null, null, $normalizer);
}
Expand All @@ -28,12 +28,12 @@ public static function create(ServerNormalizerInterface $normalizer = null): Ser
* @return ServerRequestInterface
*/
public static function createFromGlobals(
array $server = null,
array $files = null,
array $cookie = null,
array $get = null,
array $post = null,
ServerNormalizerInterface $normalizer = null
?array $server = null,
?array $files = null,
?array $cookie = null,
?array $get = null,
?array $post = null,
?ServerNormalizerInterface $normalizer = null
): ServerRequestInterface {
$server ??= $_SERVER;
$normalizer ??= new SapiNormalizer();
Expand Down
4 changes: 2 additions & 2 deletions src/UploadedFileCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public static function create(
$streamOrFile,
int $size,
int $error,
string $clientFilename = null,
string $clientMediaType = null
?string $clientFilename = null,
?string $clientMediaType = null
): UploadedFileInterface {
return new UploadedFile($streamOrFile, $size, $error, $clientFilename, $clientMediaType);
}
Expand Down

0 comments on commit 3fe38a0

Please sign in to comment.