Skip to content

Commit

Permalink
Merge pull request #340 from GromNaN/explicit-nullable
Browse files Browse the repository at this point in the history
Make implicit nullable param to explicit (PHP 8.4 compatibility)
  • Loading branch information
freekmurze authored Apr 11, 2024
2 parents 3e35d0e + a6685e5 commit b8c8ff9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/DumpRecorder/MultiDumpHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function dump($value)
}
}

public function addHandler(callable $callable = null): self
public function addHandler(?callable $callable = null): self
{
$this->handlers[] = $callable;

Expand Down
2 changes: 1 addition & 1 deletion src/Payloads/CachePayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CachePayload extends Payload
/** @var int|null */
protected $expirationInSeconds;

public function __construct(string $type, string $key, $tags, $value = null, int $expirationInSeconds = null)
public function __construct(string $type, string $key, $tags, $value = null, ?int $expirationInSeconds = null)
{
$this->type = $type;

Expand Down
2 changes: 1 addition & 1 deletion src/Payloads/MailablePayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function forMailable(Mailable $mailable)
return new self(self::renderMailable($mailable), $mailable);
}

public function __construct(string $html, Mailable $mailable = null)
public function __construct(string $html, ?Mailable $mailable = null)
{
$this->html = $html;

Expand Down
4 changes: 2 additions & 2 deletions src/Ray.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

class Ray extends BaseRay
{
public function __construct(Settings $settings, Client $client = null, string $uuid = null)
public function __construct(Settings $settings, ?Client $client = null, ?string $uuid = null)
{
// persist the enabled setting across multiple instantiations
$enabled = static::$enabled;
Expand Down Expand Up @@ -487,7 +487,7 @@ public function stopShowingHttpClientRequests(): self
return $this;
}

protected function handleWatcherCallable(Watcher $watcher, Closure $callable = null)
protected function handleWatcherCallable(Watcher $watcher, ?Closure $callable = null)
{
$rayProxy = new RayProxy();

Expand Down

0 comments on commit b8c8ff9

Please sign in to comment.