Skip to content

Commit ff176de

Browse files
committed
CS: Apply ternary_to_null_coalescing fixer
1 parent 85efcc3 commit ff176de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function setServerParameter($key, $value)
157157
*/
158158
public function getServerParameter($key, $default = '')
159159
{
160-
return isset($this->server[$key]) ? $this->server[$key] : $default;
160+
return $this->server[$key] ?? $default;
161161
}
162162

163163
public function xmlHttpRequest(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], string $content = null, bool $changeHistory = true): Crawler
@@ -671,7 +671,7 @@ protected function getAbsoluteUri($uri)
671671
} else {
672672
$currentUri = sprintf('http%s://%s/',
673673
isset($this->server['HTTPS']) ? 's' : '',
674-
isset($this->server['HTTP_HOST']) ? $this->server['HTTP_HOST'] : 'localhost'
674+
$this->server['HTTP_HOST'] ?? 'localhost'
675675
);
676676
}
677677

0 commit comments

Comments
 (0)