You are here

public function DiagnosticsService::filterWarningAndErrors in Purge 8.3

Get only SEVERITY_WARNING and SEVERITY_ERROR level checks.

Return value

\Iterator[] \Iterator object that yields DiagnosticCheckInterface instances.

Overrides DiagnosticsServiceInterface::filterWarningAndErrors

File

src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php, line 107

Class

DiagnosticsService
Provides a service that interacts with diagnostic checks.

Namespace

Drupal\purge\Plugin\Purge\DiagnosticCheck

Code

public function filterWarningAndErrors() {
  return $this
    ->filter([
    DiagnosticCheckInterface::SEVERITY_WARNING,
    DiagnosticCheckInterface::SEVERITY_ERROR,
  ]);
}