original_string: public function end()
      {
          /**
           * This event is triggered after archiving.
           *
           * @param CronArchive $this
           */
          Piwik::postEvent('CronArchive.end', array($this));
  
          if (empty($this->errors)) {
              // No error -> Logs the successful script execution until completion
              Option::set(self::OPTION_ARCHIVING_FINISHED_TS, time());
              return;
          }
  
          $this->logSection("SUMMARY OF ERRORS");
          foreach ($this->errors as $error) {
              // do not logError since errors are already in stderr
              $this->logger->info("Error: " . $error);
          }
  
          $summary = count($this->errors) . " total errors during this script execution, please investigate and try and fix these errors.";
          $this->logFatalError($summary);
      }
code: public function end()
      {
          /**
           * This event is triggered after archiving.
           *
           * @param CronArchive $this
           */
          Piwik::postEvent('CronArchive.end', array($this));
  
          if (empty($this->errors)) {
              // No error -> Logs the successful script execution until completion
              Option::set(self::OPTION_ARCHIVING_FINISHED_TS, time());
              return;
          }
  
          $this->logSection("SUMMARY OF ERRORS");
          foreach ($this->errors as $error) {
              // do not logError since errors are already in stderr
              $this->logger->info("Error: " . $error);
          }
  
          $summary = count($this->errors) . " total errors during this script execution, please investigate and try and fix these errors.";
          $this->logFatalError($summary);
      }
code_tokens: public function end ( ) { /**
           * This event is triggered after archiving.
           *
           * @param CronArchive $this
           */ Piwik :: postEvent ( 'CronArchive.end' , array ( $ this ) ) ; if ( empty ( $ this -> errors ) ) { // No error -> Logs the successful script execution until completion Option :: set ( self :: OPTION_ARCHIVING_FINISHED_TS , time ( ) ) ; return ; } $ this -> logSection ( "SUMMARY OF ERRORS" ) ; foreach ( $ this -> errors as $ error ) { // do not logError since errors are already in stderr $ this -> logger -> info ( "Error: " . $ error ) ; } $ summary = count ( $ this -> errors ) . " total errors during this script execution, please investigate and try and fix these errors." ; $ this -> logFatalError ( $ summary ) ; }
docstring: End of the script
docstring_tokens: End of the script