From ffd2cdd9432fb27e3abc451dbd768b9568834c64 Mon Sep 17 00:00:00 2001 From: theodesp <328805+theodesp@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:26:52 +0000 Subject: [PATCH] PHPCS: Fix --- .../faustwp/includes/utilities/functions.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/faustwp/includes/utilities/functions.php b/plugins/faustwp/includes/utilities/functions.php index 6d9abebb5..0a152f8f4 100644 --- a/plugins/faustwp/includes/utilities/functions.php +++ b/plugins/faustwp/includes/utilities/functions.php @@ -53,17 +53,17 @@ function plugin_version() { */ function domains_match( $domain1, $domain2 ) { // Extract the domain part - $extract_domain = function ( $url ) { - $parsed_url = wp_parse_url( $url, PHP_URL_HOST ); - return $parsed_url ? $parsed_url : null; - }; + $extract_domain = function ( $url ) { + $parsed_url = wp_parse_url( $url, PHP_URL_HOST ); + return $parsed_url ? $parsed_url : null; + }; - $domain1 = $extract_domain( $domain1 ); - $domain2 = $extract_domain( $domain2 ); + $domain1 = $extract_domain( $domain1 ); + $domain2 = $extract_domain( $domain2 ); // Remove "www" prefix from domain if present - $domain1 = preg_replace('/^www\./i', '', $domain1); - $domain2 = preg_replace('/^www\./i', '', $domain2); + $domain1 = preg_replace( '/^www\./i', '', $domain1 ); + $domain2 = preg_replace( '/^www\./i', '', $domain2 ); - return $domain1 !== null && $domain2 !== null && $domain1 === $domain2; + return $domain1 !== null && $domain2 !== null && $domain1 === $domain2; }