You are here

public function TemporaryFiles::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/TemporaryFiles.php, line 98

Class

TemporaryFiles
Check for sensitive temporary files like settings.php~.

Namespace

Drupal\security_review\Checks

Code

public function evaluatePlain(CheckResult $result) {
  $findings = $result
    ->findings();
  if (empty($findings)) {
    return '';
  }
  $output = $this
    ->t('Temporary files:') . "\n";
  foreach ($findings as $file) {
    $output .= "\t" . $file . "\n";
  }
  return $output;
}