Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

API Explicity mark nullable parameters for PHP 8.4 #4

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function serialize($data)
* @param array|null $options
* @return mixed
*/
function unserialize($data, array $options = null)
function unserialize($data, ?array $options = null)
{
SerializableClosure::enterContext();
$data = ($options === null || \PHP_MAJOR_VERSION < 7)
Expand Down
4 changes: 2 additions & 2 deletions src/SerializableClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public static function getSecurityProvider()
* @param $data
* @param ClosureScope|SplObjectStorage|null $storage
*/
public static function wrapClosures(&$data, SplObjectStorage $storage = null)
public static function wrapClosures(&$data, ?SplObjectStorage $storage = null)
{
if($storage === null){
$storage = static::$context->scope;
Expand Down Expand Up @@ -451,7 +451,7 @@ public static function wrapClosures(&$data, SplObjectStorage $storage = null)
* @param $data
* @param SplObjectStorage|null $storage
*/
public static function unwrapClosures(&$data, SplObjectStorage $storage = null)
public static function unwrapClosures(&$data, ?SplObjectStorage $storage = null)
{
if($storage === null){
$storage = static::$context->scope;
Expand Down