You are here

public function UpdateEvent::getResults in Automatic Updates 8.2

Gets the validation results.

Parameters

int|null $severity: (optional) The severity for the results to return. Should be one of the SystemManager::REQUIREMENT_* constants.

Return value

\Drupal\automatic_updates\Validation\ValidationResult[] The validation results.

File

src/Event/UpdateEvent.php, line 72

Class

UpdateEvent
Event fired when a site is updating.

Namespace

Drupal\automatic_updates\Event

Code

public function getResults(?int $severity = NULL) : array {
  if ($severity !== NULL) {
    return array_filter($this->results, function ($result) use ($severity) {
      return $result
        ->getSeverity() === $severity;
    });
  }
  return $this->results;
}