public function ErrorReporting::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/ ErrorReporting.php, line 86
Class
- ErrorReporting
- Defines a security check that checks the error reporting setting.
Namespace
Drupal\security_review\ChecksCode
public function evaluatePlain(CheckResult $result) {
if ($result
->result() == CheckResult::SUCCESS) {
return '';
}
if (isset($result
->findings()['level'])) {
return $this
->t('Error level: @level', [
'@level' => $result
->findings()['level'],
]);
}
return '';
}