Skip to content

Commit

Permalink
Spaces inside parens
Browse files Browse the repository at this point in the history
  • Loading branch information
adfaklsdjf committed Mar 30, 2022
1 parent fbb8406 commit 09ed4e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions php/pantheon/checks/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function run() {
protected function getPluginVulnerability( $plugin_slug )
{
// Get the vulnerability API token from the platform
$wpvulndb_api_token = $this->getWpScanApiToken();
$wpvulndb_api_token = $this->getWpScanApiToken();

// Throw an exception if there is no token
if( false === $wpvulndb_api_token || empty( $wpvulndb_api_token ) ) {
Expand Down Expand Up @@ -123,26 +123,26 @@ protected function getPluginVulnerability( $plugin_slug )


protected function getWpScanApiToken() {
if(!defined("WPSCAN_API_TOKEN")) {
if( !defined( "WPSCAN_API_TOKEN" ) ) {
return false;
}
if(!defined("PANTHEON_WPSCAN_ENVIRONMENTS")) {
if( !defined( "PANTHEON_WPSCAN_ENVIRONMENTS" ) ) {
return false;
}
$environments = explode(',', PANTHEON_WPSCAN_ENVIRONMENTS);
$environments = explode( ',', PANTHEON_WPSCAN_ENVIRONMENTS );

if(
!in_array(getenv('PANTHEON_ENVIRONMENT'), $environments)
&& !in_array('*', $environments)
!in_array( getenv( 'PANTHEON_ENVIRONMENT' ), $environments )
&& !in_array( '*', $environments )
) {
return false;
}

if(defined('WPSCAN_API_TOKEN')) {
if( defined( 'WPSCAN_API_TOKEN') ) {
return WPSCAN_API_TOKEN;
}

return getenv('PANTHEON_WPVULNDB_API_TOKEN');
return getenv( 'PANTHEON_WPVULNDB_API_TOKEN' );
}

/**
Expand Down

0 comments on commit 09ed4e8

Please sign in to comment.