From 3a563a95a46472bae0a0baefd910e35e49155d6f Mon Sep 17 00:00:00 2001 From: Ashfame Date: Fri, 3 Nov 2023 11:25:26 +0400 Subject: [PATCH] change var names to be more consistent --- src/SiteStatusTests.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SiteStatusTests.php b/src/SiteStatusTests.php index 9e6ae34..a634bea 100644 --- a/src/SiteStatusTests.php +++ b/src/SiteStatusTests.php @@ -27,13 +27,13 @@ public function register_site_status_tests( $tests ): array { } public function site_status_test_public_key(): array { - $key_not_defined = ! defined( 'OIDC_PUBLIC_KEY' ); + $key_is_defined = defined( 'OIDC_PUBLIC_KEY' ); $key_has_valid_pem_headers = (bool) preg_match( '/^-----BEGIN\s.*PUBLIC KEY-----.*-----END\s.*PUBLIC KEY-----$/s', OIDC_PUBLIC_KEY ); - if ( $key_not_defined ) { + if ( ! $key_is_defined ) { $label = __( 'The public key constant OIDC_PUBLIC_KEY is not defined.', 'openid-connect-server' ); $status = 'critical'; $badge = 'red'; @@ -71,13 +71,13 @@ public function site_status_test_public_key(): array { } public function site_status_test_private_key(): array { - $key_not_defined = ! defined( 'OIDC_PRIVATE_KEY' ); + $key_is_defined = defined( 'OIDC_PRIVATE_KEY' ); $key_has_valid_pem_headers = (bool) preg_match( '/^-----BEGIN\s.*PRIVATE KEY-----.*-----END\s.*PRIVATE KEY-----$/s', OIDC_PRIVATE_KEY ); - if ( $key_not_defined ) { + if ( ! $key_is_defined ) { $label = __( 'The private key constant OIDC_PRIVATE_KEY is not defined.', 'openid-connect-server' ); $status = 'critical'; $badge = 'red';