Extracts the highest severity from the requirements array.
$requirements: An array of requirements, in the same format as is returned by hook_requirements().
The highest severity in the array.
public function getMaxSeverity(&$requirements) {
$severity = static::REQUIREMENT_OK;
foreach ($requirements as $requirement) {
if (isset($requirement['severity'])) {
$severity = max($severity, $requirement['severity']);
}
}
return $severity;
}