<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$
 */
 
  /**
   * ParserMessage
   *
   * @purpose  Value object
   */
  class ParserMessage extends Object {
    public
      $code    = 0,
      $message = '';

    /**
     * Constructor
     *
     * @param   int code
     * @param   string message
     */
    public function __construct($code, $message) {
      $this->code= $code;
      $this->message= $message;
    }
  
    /**
     * Creates a string representation of this object
     * 
     * @return  string
     */
    public function toString() {
      return $this->getClassName().'('.$this->code.') {"'.$this->message.'"}';
    }
  }
?>
<commit_msg>- Add expected member<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$
 */
 
  /**
   * ParserMessage
   *
   * @purpose  Value object
   */
  class ParserMessage extends Object {
    public
      $code     = 0,
      $message  = '',
      $expected = array();

    /**
     * Constructor
     *
     * @param   int code
     * @param   string message
     * @param   string[] expected
     */
    public function __construct($code, $message, $expected) {
      $this->code= $code;
      $this->message= $message;
      $this->expected= $expected;
    }
  
    /**
     * Creates a string representation of this object
     * 
     * @return  string
     */
    public function toString() {
      return sprintf(
        '%s(%d: %s%s)',
        $this->getClassName(),
        $this->code,
        $this->message,
        $this->expected ? ', expected one of ['.implode(', ', $this->expected).']' : ''
      );
    }
  }
?>

{'fraction_non_alphanumeric': 0.15464547677261614, 'fraction_numerical': 0.0012224938875305623, 'mean_word_length': 1.8321799307958477, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5219254', 'n_tokens_mistral': 516, 'n_tokens_neox': 507, 'n_words': 125}