From a01f185b31e6f6fc07aef4ebceb67ad1537eba26 Mon Sep 17 00:00:00 2001 From: freek Date: Mon, 5 Feb 2018 20:22:16 +0100 Subject: [PATCH] code style --- src/SslCertificate.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/SslCertificate.php b/src/SslCertificate.php index 4ac6a50..d744d63 100644 --- a/src/SslCertificate.php +++ b/src/SslCertificate.php @@ -189,12 +189,10 @@ protected function wildcardHostCoversHost(string $wildcardHost, string $host): b } $wildcardHostWithoutWildcard = substr($wildcardHost, 1); - $hostWithDottedPrefix = '.'.$host; - if (ends_with($hostWithDottedPrefix, $wildcardHostWithoutWildcard)) { - return true; - } - return false; + $hostWithDottedPrefix = ".{$host}"; + + return ends_with($hostWithDottedPrefix, $wildcardHostWithoutWildcard); } public function getRawCertificateFieldsJson(): string