code: protected function generatePatterns($rules)
      {
          $patterns = array();
          foreach ($rules as $rule) {
              $patterns[] = $this->generatePattern($rule);
          }
  
          return $patterns;
      }
docs: Generates a set of exclude patterns for filter() from gitignore rules
  
  @param array $rules A list of exclude rules in gitignore syntax
  
  @return array Exclude patterns