Skip to content

Commit

Permalink
change var names to be more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfame committed Nov 3, 2023
1 parent 5db62fe commit 3a563a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SiteStatusTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 3a563a9

Please sign in to comment.