Skip to content

Commit

Permalink
Fix more PHP 8.4 deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Dec 1, 2024
1 parent 0994f98 commit 9389663
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion includes/opis/closure/src/ReflectionClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ReflectionClosure extends ReflectionFunction
*
* @throws \ReflectionException
*/
public function __construct(Closure $closure, string $code = null)
public function __construct(Closure $closure, ?string $code = null)
{
parent::__construct($closure);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Adapters/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class Process extends SymfonyProcess
*/
public function __construct(
array $command,
string $cwd = null,
array $env = null,
?string $cwd = null,
?array $env = null,
mixed $input = null,
?float $timeout = 60,
array $options = null
?array $options = null
) {
parent::__construct($command, $cwd, $env, $input, $timeout, $options); //@phpstan-ignore-line

Expand Down
2 changes: 1 addition & 1 deletion src/Process/Worker/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function __construct(
private string $stdoutBuffer = '',
private string $stderrBuffer = '',
private mixed $returnValue = null,
int $memoryUsage = null
?int $memoryUsage = null
) {
$this->memoryUsage = $memoryUsage;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public static function tmpDir(
string $prefix = '',
array $contents = [],
int $mode = 0777,
string $tmpRootDir = null
?string $tmpRootDir = null
): string {
if ($tmpRootDir === null) {
$tmpRootDir = Env::get('TEST_TMP_ROOT_DIR') ?? codecept_output_dir('tmp');
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function setPropertiesForClass(
?object $object,
string $class,
array $props,
array &$propsToSet = null
?array &$propsToSet = null
): object {
if (!class_exists($class)) {
throw new InvalidArgumentException(
Expand Down
2 changes: 1 addition & 1 deletion src/WordPress/Installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public static function findInDir(string $searchDir, bool $checkDb = true): self
public function configure(
DatabaseInterface $db,
int $multisite = InstallationStateInterface::SINGLE_SITE,
ConfigurationData $configurationData = null
?ConfigurationData $configurationData = null
): self {
$this->installationState = $this->installationState->configure($db, $multisite, $configurationData);

Expand Down

0 comments on commit 9389663

Please sign in to comment.