Skip to content

Commit 1b78aa4

Browse files
authored
Shorten null coalescing operator (#549)
1 parent ce6a8d4 commit 1b78aa4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/BrowserFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(string $chromeBinary = null)
6565
*/
6666
public function createBrowser(?array $options = null): ProcessAwareBrowser
6767
{
68-
$options = $options ?? $this->options;
68+
$options ??= $this->options;
6969

7070
// create logger from options
7171
$logger = self::createLogger($options);

src/Communication/ResponseReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function waitForResponse(int $timeout = null): Response
109109
return $this->getResponse();
110110
}
111111

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

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

0 commit comments

Comments
 (0)