Skip to content

Commit

Permalink
Merge pull request #7 from mvenghaus/fix/php84-explicit-nullable-para…
Browse files Browse the repository at this point in the history
…m-type

fix (php8.4): ExplicitNullableParamType
  • Loading branch information
cerbero90 authored Jan 17, 2025
2 parents e64ed04 + c76986e commit 5eff8a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/JsonParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function pointers(array $pointers): self
* @param Closure|null $callback
* @return self
*/
public function pointer(string $pointer, Closure $callback = null): self
public function pointer(string $pointer, ?Closure $callback = null): self
{
$this->config->pointers->add(new Pointer($pointer, false, $callback));

Expand Down Expand Up @@ -132,7 +132,7 @@ public function lazyPointers(array $pointers): self
* @param Closure|null $callback
* @return self
*/
public function lazyPointer(string $pointer, Closure $callback = null): self
public function lazyPointer(string $pointer, ?Closure $callback = null): self
{
$this->config->pointers->add(new Pointer($pointer, true, $callback));

Expand All @@ -155,7 +155,7 @@ public function lazy(): self
* @param Closure|null $callback
* @return void
*/
public function traverse(Closure $callback = null): void
public function traverse(?Closure $callback = null): void
{
foreach ($this as $key => $value) {
$callback && $callback($value, $key, $this);
Expand Down

0 comments on commit 5eff8a5

Please sign in to comment.