original_string: private function throwIfPiwikVersionIsOlderThanDBSchema()
      {
          // When developing this situation happens often when switching branches
          if (Development::isEnabled()) {
              return;
          }
  
          if (!StaticContainer::get('EnableDbVersionCheck')) {
              return;
          }
  
          $updater = new Updater();
  
          $dbSchemaVersion = $updater->getCurrentComponentVersion('core');
          $current = Version::VERSION;
          if (-1 === version_compare($current, $dbSchemaVersion)) {
              $messages = array(
                  Piwik::translate('General_ExceptionDatabaseVersionNewerThanCodebase', array($current, $dbSchemaVersion)),
                  Piwik::translate('General_ExceptionDatabaseVersionNewerThanCodebaseWait'),
                  // we cannot fill in the Super User emails as we are failing before Authentication was ready
                  Piwik::translate('General_ExceptionContactSupportGeneric', array('', ''))
              );
              throw new DatabaseSchemaIsNewerThanCodebaseException(implode(" ", $messages));
          }
      }
code: private function throwIfPiwikVersionIsOlderThanDBSchema()
      {
          // When developing this situation happens often when switching branches
          if (Development::isEnabled()) {
              return;
          }
  
          if (!StaticContainer::get('EnableDbVersionCheck')) {
              return;
          }
  
          $updater = new Updater();
  
          $dbSchemaVersion = $updater->getCurrentComponentVersion('core');
          $current = Version::VERSION;
          if (-1 === version_compare($current, $dbSchemaVersion)) {
              $messages = array(
                  Piwik::translate('General_ExceptionDatabaseVersionNewerThanCodebase', array($current, $dbSchemaVersion)),
                  Piwik::translate('General_ExceptionDatabaseVersionNewerThanCodebaseWait'),
                  // we cannot fill in the Super User emails as we are failing before Authentication was ready
                  Piwik::translate('General_ExceptionContactSupportGeneric', array('', ''))
              );
              throw new DatabaseSchemaIsNewerThanCodebaseException(implode(" ", $messages));
          }
      }
code_tokens: private function throwIfPiwikVersionIsOlderThanDBSchema ( ) { // When developing this situation happens often when switching branches if ( Development :: isEnabled ( ) ) { return ; } if ( ! StaticContainer :: get ( 'EnableDbVersionCheck' ) ) { return ; } $ updater = new Updater ( ) ; $ dbSchemaVersion = $ updater -> getCurrentComponentVersion ( 'core' ) ; $ current = Version :: VERSION ; if ( - 1 === version_compare ( $ current , $ dbSchemaVersion ) ) { $ messages = array ( Piwik :: translate ( 'General_ExceptionDatabaseVersionNewerThanCodebase' , array ( $ current , $ dbSchemaVersion ) ) , Piwik :: translate ( 'General_ExceptionDatabaseVersionNewerThanCodebaseWait' ) , // we cannot fill in the Super User emails as we are failing before Authentication was ready Piwik :: translate ( 'General_ExceptionContactSupportGeneric' , array ( '' , '' ) ) ) ; throw new DatabaseSchemaIsNewerThanCodebaseException ( implode ( " " , $ messages ) ) ; } }
docstring: This method ensures that Piwik Platform cannot be running when using a NEWER database.
docstring_tokens: This method ensures that Piwik Platform cannot be running when using a NEWER database .