original_string: public static function getAllMetricsToKeep()
      {
          $metricsToKeep = self::getMetricsToKeep();
  
          // convert goal metric names to correct archive names
          if (Common::isGoalPluginEnabled()) {
              $goalMetricsToKeep = self::getGoalMetricsToKeep();
  
              $maxGoalId = self::getMaxGoalId();
  
              // for each goal metric, there's a different name for each goal, including the overview,
              // the order report & cart report
              foreach ($goalMetricsToKeep as $metric) {
                  for ($i = 1; $i <= $maxGoalId; ++$i) // maxGoalId can be 0
                  {
                      $metricsToKeep[] = Archiver::getRecordName($metric, $i);
                  }
  
                  $metricsToKeep[] = Archiver::getRecordName($metric);
                  $metricsToKeep[] = Archiver::getRecordName($metric, GoalManager::IDGOAL_ORDER);
                  $metricsToKeep[] = Archiver::getRecordName($metric, GoalManager::IDGOAL_CART);
              }
          }
  
          return $metricsToKeep;
      }
code: public static function getAllMetricsToKeep()
      {
          $metricsToKeep = self::getMetricsToKeep();
  
          // convert goal metric names to correct archive names
          if (Common::isGoalPluginEnabled()) {
              $goalMetricsToKeep = self::getGoalMetricsToKeep();
  
              $maxGoalId = self::getMaxGoalId();
  
              // for each goal metric, there's a different name for each goal, including the overview,
              // the order report & cart report
              foreach ($goalMetricsToKeep as $metric) {
                  for ($i = 1; $i <= $maxGoalId; ++$i) // maxGoalId can be 0
                  {
                      $metricsToKeep[] = Archiver::getRecordName($metric, $i);
                  }
  
                  $metricsToKeep[] = Archiver::getRecordName($metric);
                  $metricsToKeep[] = Archiver::getRecordName($metric, GoalManager::IDGOAL_ORDER);
                  $metricsToKeep[] = Archiver::getRecordName($metric, GoalManager::IDGOAL_CART);
              }
          }
  
          return $metricsToKeep;
      }
code_tokens: public static function getAllMetricsToKeep ( ) { $ metricsToKeep = self :: getMetricsToKeep ( ) ; // convert goal metric names to correct archive names if ( Common :: isGoalPluginEnabled ( ) ) { $ goalMetricsToKeep = self :: getGoalMetricsToKeep ( ) ; $ maxGoalId = self :: getMaxGoalId ( ) ; // for each goal metric, there's a different name for each goal, including the overview, // the order report & cart report foreach ( $ goalMetricsToKeep as $ metric ) { for ( $ i = 1 ; $ i <= $ maxGoalId ; ++ $ i ) // maxGoalId can be 0 { $ metricsToKeep [ ] = Archiver :: getRecordName ( $ metric , $ i ) ; } $ metricsToKeep [ ] = Archiver :: getRecordName ( $ metric ) ; $ metricsToKeep [ ] = Archiver :: getRecordName ( $ metric , GoalManager :: IDGOAL_ORDER ) ; $ metricsToKeep [ ] = Archiver :: getRecordName ( $ metric , GoalManager :: IDGOAL_CART ) ; } } return $ metricsToKeep ; }
docstring: Returns the names of metrics that should be kept when purging as they appear in
  archive tables.
docstring_tokens: Returns the names of metrics that should be kept when purging as they appear in archive tables .