Skip to content

Commit

Permalink
Shorten null coalescing operator (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k authored Sep 22, 2023
1 parent ce6a8d4 commit 1b78aa4
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 1b78aa4

Please sign in to comment.