original_string: protected function isAccepted($string)
      {
          // should at least not match one rule to exclude
          foreach ($this->noMatchRegexps as $regex) {
              if (preg_match($regex, $string)) {
                  return false;
              }
          }
  
          // should at least match one rule
          if ($this->matchRegexps) {
              foreach ($this->matchRegexps as $regex) {
                  if (preg_match($regex, $string)) {
                      return true;
                  }
              }
  
              return false;
          }
  
          // If there is no match rules, the file is accepted
          return true;
      }
code: protected function isAccepted($string)
      {
          // should at least not match one rule to exclude
          foreach ($this->noMatchRegexps as $regex) {
              if (preg_match($regex, $string)) {
                  return false;
              }
          }
  
          // should at least match one rule
          if ($this->matchRegexps) {
              foreach ($this->matchRegexps as $regex) {
                  if (preg_match($regex, $string)) {
                      return true;
                  }
              }
  
              return false;
          }
  
          // If there is no match rules, the file is accepted
          return true;
      }
code_tokens: protected function isAccepted ( $ string ) { // should at least not match one rule to exclude foreach ( $ this -> noMatchRegexps as $ regex ) { if ( preg_match ( $ regex , $ string ) ) { return false ; } } // should at least match one rule if ( $ this -> matchRegexps ) { foreach ( $ this -> matchRegexps as $ regex ) { if ( preg_match ( $ regex , $ string ) ) { return true ; } } return false ; } // If there is no match rules, the file is accepted return true ; }
docstring: Checks whether the string is accepted by the regex filters.
  
  If there is no regexps defined in the class, this method will accept the string.
  Such case can be handled by child classes before calling the method if they want to
  apply a different behavior.
  
  @param string $string The string to be matched against filters
  
  @return bool
docstring_tokens: Checks whether the string is accepted by the regex filters .