original_string: protected function filterList(array $nodes = array(), array $rules = array())
    {
      if(!empty($rules))
      {
        foreach($nodes as $node)
        {
          if(!$node instanceof Node) continue;
  
          $props = $node->getInfo(FALSE);
          $props = array_intersect_key($props, $rules);
  
          foreach($props as $key => $val)
          {
            if($val instanceof Str)
            {
              $match = $val->contains($rules[$key], TRUE);
            }
            else
            {
              $match = $val == $rules[$key];
            }
  
            if($match === FALSE)
            {
              unset($nodes[$node->getId()]);
            }
          }
        }
      }
  
      return $nodes;
    }
code: protected function filterList(array $nodes = array(), array $rules = array())
    {
      if(!empty($rules))
      {
        foreach($nodes as $node)
        {
          if(!$node instanceof Node) continue;
  
          $props = $node->getInfo(FALSE);
          $props = array_intersect_key($props, $rules);
  
          foreach($props as $key => $val)
          {
            if($val instanceof Str)
            {
              $match = $val->contains($rules[$key], TRUE);
            }
            else
            {
              $match = $val == $rules[$key];
            }
  
            if($match === FALSE)
            {
              unset($nodes[$node->getId()]);
            }
          }
        }
      }
  
      return $nodes;
    }
code_tokens: protected function filterList ( array $ nodes = array ( ) , array $ rules = array ( ) ) { if ( ! empty ( $ rules ) ) { foreach ( $ nodes as $ node ) { if ( ! $ node instanceof Node ) continue ; $ props = $ node -> getInfo ( FALSE ) ; $ props = array_intersect_key ( $ props , $ rules ) ; foreach ( $ props as $ key => $ val ) { if ( $ val instanceof Str ) { $ match = $ val -> contains ( $ rules [ $ key ] , TRUE ) ; } else { $ match = $ val == $ rules [ $ key ] ; } if ( $ match === FALSE ) { unset ( $ nodes [ $ node -> getId ( ) ] ) ; } } } } return $ nodes ; }
docstring: Filters given node list array using specified filter rules.
  
  @param  array $nodes
  @param  array $rules
  @return array
docstring_tokens: Filters given node list array using specified filter rules .