Beispiel #1
0
 /**
  * Store the newest entry's date into the last update file, so that the user
  * isn't shown the same changes in the future
  *
  * @param  string  $path The path to the last update file
  * @param  boolean $date The date command line argument (used to determine
  *                       whether we should store the last update or not)
  * @return void
  */
 private function storeLastUpdate($path, $date)
 {
     if ($date !== null) {
         // The user probably run the command to see old changes, we don't
         // consider this a result of an update
         return;
     }
     $data = array('date' => $this->lastUpdateDate->toFormattedDateString(), 'changes' => $this->alreadyListedChanges);
     file_put_contents($path, Yaml::dump($data, 3));
 }