From c7d8ebe8993595de82650f830b68939fd1393247 Mon Sep 17 00:00:00 2001 From: Freek Date: Fri, 11 May 2018 11:15:17 +0200 Subject: [PATCH] refactor for readability --- src/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Url.php b/src/Url.php index a4f503d..1affc90 100644 --- a/src/Url.php +++ b/src/Url.php @@ -40,6 +40,6 @@ public function getHostName(): string public function getPort(): int { - return array_key_exists('port', $this->parsedUrl) ? (int) $this->parsedUrl['port'] : 443; + return $this->parsedUrl['port'] ?? 443; } }