original_string: protected function filter($path, array $patterns)
      {
          foreach ($patterns as $pattern) {
              if ($pattern[0] == '!' ? !fnmatch(substr($pattern, 1), $path) : fnmatch($pattern, $path)) {
                  return false;
              }
          }
  
          return true;
      }
code: protected function filter($path, array $patterns)
      {
          foreach ($patterns as $pattern) {
              if ($pattern[0] == '!' ? !fnmatch(substr($pattern, 1), $path) : fnmatch($pattern, $path)) {
                  return false;
              }
          }
  
          return true;
      }
code_tokens: protected function filter ( $ path , array $ patterns ) { foreach ( $ patterns as $ pattern ) { if ( $ pattern [ 0 ] == '!' ? ! fnmatch ( substr ( $ pattern , 1 ) , $ path ) : fnmatch ( $ pattern , $ path ) ) { return false ; } } return true ; }
docstring: Filters the given path.
  
  @param array $patterns
  @return bool
docstring_tokens: Filters the given path .