Skip to content

Commit

Permalink
Fix implicit nullable to prevent deprecation on PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vokomarov committed Feb 6, 2025
1 parent cea42b3 commit d2e2731
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ArrayInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function withPrefix(string $prefix, bool $add = true): InputInterface
return $input;
}

public function getValue(string $source, string $name = null): mixed
public function getValue(string $source, ?string $name = null): mixed
{
try {
return $this->dotGet($name);
Expand Down
2 changes: 1 addition & 1 deletion src/Bootloader/FiltersBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function init(ConsoleBootloader $console, ScaffolderBootloader $scaffolde
$this->registerCommands($console);
}

public function createInjection(\ReflectionClass $class, string $context = null): object
public function createInjection(\ReflectionClass $class, ?string $context = null): object
{
return $this->container->get(FilterProviderInterface::class)->createFilter(
$class->getName(),
Expand Down
2 changes: 1 addition & 1 deletion src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function reset(): void
$this->errors = null;
}

public function setField(string $name, mixed $value, bool $filter = true): self
public function setField(string $name, mixed $value, ?bool $filter = true): self
{
parent::setField($name, $value, $filter);
$this->reset();
Expand Down

0 comments on commit d2e2731

Please sign in to comment.