Skip to content

Commit

Permalink
Shorten null coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Sep 20, 2023
1 parent ce6a8d4 commit 5b2c853
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BrowserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct(string $chromeBinary = null)
*/
public function createBrowser(?array $options = null): ProcessAwareBrowser
{
$options = $options ?? $this->options;
$options ??= $this->options;

// create logger from options
$logger = self::createLogger($options);
Expand Down
2 changes: 1 addition & 1 deletion src/Communication/ResponseReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function waitForResponse(int $timeout = null): Response
return $this->getResponse();
}

$timeout = $timeout ?? $this->connection->getSendSyncDefaultTimeout();
$timeout ??= $this->connection->getSendSyncDefaultTimeout();

return Utils::tryWithTimeout($timeout * 1000, $this->waitForResponseGenerator());
}
Expand Down

0 comments on commit 5b2c853

Please sign in to comment.