You are here

public function Console::getSymphonyStyle in Site Audit 8.3

Get the SymfonyStyle method associated with a percentage.

Return value

string Symfony\Component\Console\Style method.

1 call to Console::getSymphonyStyle()
Console::render in src/Renderer/Console.php

File

src/Renderer/Console.php, line 76

Class

Console

Namespace

Drupal\site_audit\Renderer

Code

public function getSymphonyStyle($percent) {
  if ($percent > 80) {
    return 'success';
  }
  if ($percent > 65) {
    return 'warning';
  }
  if ($percent >= 0) {
    return 'error';
  }
  return 'note';
}