Skip to content

Commit

Permalink
Use correct guard property
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Feb 13, 2024
1 parent 1ef7ac4 commit a79dc87
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ public static function start(
private static function getRunner(): ProcessRunner
{
/** @psalm-suppress RedundantPropertyInitializationCheck */
if (!isset(self::$driverRunner)) {
self::$driverRunner = new \WeakMap();
self::$driverRunner ??= new \WeakMap();

/** @psalm-suppress RedundantPropertyInitializationCheck */
if (!isset(self::$procHolder)) {
self::$procHolder = new \WeakMap();

\register_shutdown_function(static function (): void {
/** @var ProcHolder $procHolder */
Expand All @@ -108,9 +111,6 @@ private static function getRunner(): ProcessRunner
});
}

/** @psalm-suppress RedundantPropertyInitializationCheck */
self::$procHolder ??= new \WeakMap();

/** @psalm-suppress RedundantPropertyInitializationCheck */
self::$streamHolder ??= new \WeakMap();

Expand Down

0 comments on commit a79dc87

Please sign in to comment.