<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  uses('io.collections.iterate.AbstractCombinedFilter');

  /**
   * Combined filter that accepts an element if any of its filters
   * accept the element.
   *
   * This filter:
   * <code>
   *   $filter= &new AnyOfFilter(array(
   *     new SizeSmallerThanFilter(500),
   *     new ExtensionEqualsFilter('txt')
   *   ));
   * </code>
   * will accept any elements smaller than 500 bytes or with a
   * ".txt"-extension.
   *
   * @purpose  Iteration Filter
   */
  class AnyOfFilter extends AbstractCombinedFilter {
    
    /**
     * Accepts an element
     *
     * @model  abstract
     * @access  public
     * @param   &io.collections.IOElement element
     * @return  bool
     */
    function accept(&$element) {
      for ($i= 0; $i < $this->_size; $i++) {
      
        // The first filter that accepts the element => we accept the element
        if ($this->list[$i]->accept($element)) return TRUE;
      }
      
      // None of the filters have accepted the element, so we won't accept it
      return FALSE;
    }
  }
?>
<commit_msg>- Remove incoreect abstract modifier to accept() method<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  uses('io.collections.iterate.AbstractCombinedFilter');

  /**
   * Combined filter that accepts an element if any of its filters
   * accept the element.
   *
   * This filter:
   * <code>
   *   $filter= &new AnyOfFilter(array(
   *     new SizeSmallerThanFilter(500),
   *     new ExtensionEqualsFilter('txt')
   *   ));
   * </code>
   * will accept any elements smaller than 500 bytes or with a
   * ".txt"-extension.
   *
   * @purpose  Iteration Filter
   */
  class AnyOfFilter extends AbstractCombinedFilter {
    
    /**
     * Accepts an element
     *
     * @access  public
     * @param   &io.collections.IOElement element
     * @return  bool
     */
    function accept(&$element) {
      for ($i= 0; $i < $this->_size; $i++) {
      
        // The first filter that accepts the element => we accept the element
        if ($this->list[$i]->accept($element)) return TRUE;
      }
      
      // None of the filters have accepted the element, so we won't accept it
      return FALSE;
    }
  }
?>

{'fraction_non_alphanumeric': 0.11875547765118318, 'fraction_numerical': 0.006134969325153374, 'mean_word_length': 2.2614285714285716, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '368262', 'n_tokens_mistral': 705, 'n_tokens_neox': 676, 'n_words': 215}