original_string: public static function formatError($message, $errorValues)
      {
          foreach ($errorValues as $token => $value) {
              $message = preg_replace("/\%$token\%/", $value, $message);
          }
          return $message;
      }
code: public static function formatError($message, $errorValues)
      {
          foreach ($errorValues as $token => $value) {
              $message = preg_replace("/\%$token\%/", $value, $message);
          }
          return $message;
      }
code_tokens: public static function formatError ( $ message , $ errorValues ) { foreach ( $ errorValues as $ token => $ value ) { $ message = preg_replace ( "/\%$token\%/" , $ value , $ message ) ; } return $ message ; }
docstring: Replaces placeholder tokens in an error message with actual values.
  
  This method enables you to internationalize the messages for the
  File_MARC class by simply replacing the File_MARC_Exception::$messages
  array with translated values for the messages.
  
  @param string $message     Error message containing placeholders
  @param array  $errorValues Actual values to substitute for placeholders
  
  @return string             Formatted message
docstring_tokens: Replaces placeholder tokens in an error message with actual values .