original_string: public static function outcome_from_results($results) {
          $outcome = self::BACKUP_STATUS_OK;
          foreach ($results as $code => $value) {
              // Each possible error and warning code has to be specified in this switch
              // which basically analyses the results to return the correct backup status.
              switch ($code) {
                  case 'missing_files_in_pool':
                      $outcome = self::BACKUP_STATUS_WARNING;
                      break;
              }
              // If we found the highest error level, we exit the loop.
              if ($outcome == self::BACKUP_STATUS_ERROR) {
                  break;
              }
          }
          return $outcome;
      }
code: public static function outcome_from_results($results) {
          $outcome = self::BACKUP_STATUS_OK;
          foreach ($results as $code => $value) {
              // Each possible error and warning code has to be specified in this switch
              // which basically analyses the results to return the correct backup status.
              switch ($code) {
                  case 'missing_files_in_pool':
                      $outcome = self::BACKUP_STATUS_WARNING;
                      break;
              }
              // If we found the highest error level, we exit the loop.
              if ($outcome == self::BACKUP_STATUS_ERROR) {
                  break;
              }
          }
          return $outcome;
      }
code_tokens: public static function outcome_from_results ( $ results ) { $ outcome = self :: BACKUP_STATUS_OK ; foreach ( $ results as $ code => $ value ) { // Each possible error and warning code has to be specified in this switch // which basically analyses the results to return the correct backup status. switch ( $ code ) { case 'missing_files_in_pool' : $ outcome = self :: BACKUP_STATUS_WARNING ; break ; } // If we found the highest error level, we exit the loop. if ( $ outcome == self :: BACKUP_STATUS_ERROR ) { break ; } } return $ outcome ; }
docstring: Returns the backup outcome by analysing its results.
  
  @param array $results returned by a backup
  @return int {@link self::BACKUP_STATUS_OK} and other constants
docstring_tokens: Returns the backup outcome by analysing its results .