You are here

public function HashSaltRequirement::verify in Acquia Content Hub 8

Verifies the requirement.

Return value

int The requirement status code:

Overrides ContentHubRequirementBase::verify

File

acquia_contenthub_diagnostic/src/Plugin/ContentHubRequirement/HashSaltRequirement.php, line 21

Class

HashSaltRequirement
Defines a salt hash requirement.

Namespace

Drupal\acquia_contenthub_diagnostic\Plugin\ContentHubRequirement

Code

public function verify() {
  if (strlen(Settings::get('hash_salt'))) {
    return REQUIREMENT_OK;
  }
  $this
    ->setValue($this
    ->t('Not set'));
  $this
    ->setDescription($this
    ->t('The <code>hash_salt</code> setting is not configured in settings.php.'));
  return REQUIREMENT_ERROR;
}