You are here

public function PrivateFiles::evaluatePlain in Security Review 8

Evaluates a CheckResult and returns a plaintext output.

Parameters

\Drupal\security_review\CheckResult $result: The check result to evaluate.

Return value

string The evaluation string.

Overrides Check::evaluatePlain

File

src/Checks/PrivateFiles.php, line 90

Class

PrivateFiles
Checks whether the private files' directory is under the web root.

Namespace

Drupal\security_review\Checks

Code

public function evaluatePlain(CheckResult $result) {
  if ($result
    ->result() != CheckResult::FAIL) {
    return '';
  }
  return $this
    ->t('Private files directory: @path', [
    '@path' => $result
      ->findings()['path'],
  ]);
}