You are here

public function Check::lastRun in Security Review 8

Returns the timestamp the check was last run.

Returns 0 if it has not been run yet.

Return value

int The timestamp of the last stored result.

File

src/Check.php, line 304

Class

Check
Defines a security check.

Namespace

Drupal\security_review

Code

public function lastRun() {
  $last_result_time = $this->state
    ->get($this->statePrefix . 'last_result.time');
  if (!is_int($last_result_time)) {
    return 0;
  }
  return $last_result_time;
}