Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / security_review / src / SecurityReview.php
index 03c48fe90da7003d521297ac79336b7a7a10e533..fafaa9c5349c4e86da978a0a7eef207a0771dffe 100644 (file)
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\security_review\SecurityReview.
- */
-
 namespace Drupal\security_review;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
@@ -119,7 +114,7 @@ class SecurityReview {
    *   The last time Security Review has been run.
    */
   public function getLastRun() {
-    return $this->config->get('last_run');
+    return $this->state->get('last_run', 0);
   }
 
   /**
@@ -168,8 +163,7 @@ class SecurityReview {
    *   The new value for 'last_run'.
    */
   public function setLastRun($last_run) {
-    $this->config->set('last_run', $last_run);
-    $this->config->save();
+    $this->state->set('last_run', $last_run);
   }
 
   /**