public function Checklist::groupChecksByNamespace in Security Review 8
Groups an array of checks by their namespaces.
Parameters
\Drupal\security_review\Check[] $checks: The array of Checks to group.
Return value
array Array containing Checks grouped by their namespaces.
File
- src/
Checklist.php, line 124
Class
- Checklist
- Contains static functions for handling checks throughout every module.
Namespace
Drupal\security_reviewCode
public function groupChecksByNamespace(array $checks) {
$output = [];
foreach ($checks as $check) {
$output[$check
->getMachineNamespace()][] = $check;
}
return $output;
}