original_string: private static function extract(NodeInterface $node)
      {
          $attributes = [];
          $nodes = [];
  
          foreach (self::extractProperties($node) as $name => $value) {
              if (is_array($value)) {
                  foreach ($value as $item) {
                      if ($item instanceof NodeInterface) {
                          $nodes[$name][] = $item;
                      } else {
                          $attributes[$name][] = $item;
                      }
                  }
              } else {
                  if ($value instanceof NodeInterface) {
                      $nodes[$name] = $value;
                  } else {
                      $attributes[$name] = $value;
                  }
              }
          }
  
          return [$attributes, $nodes];
      }
code: private static function extract(NodeInterface $node)
      {
          $attributes = [];
          $nodes = [];
  
          foreach (self::extractProperties($node) as $name => $value) {
              if (is_array($value)) {
                  foreach ($value as $item) {
                      if ($item instanceof NodeInterface) {
                          $nodes[$name][] = $item;
                      } else {
                          $attributes[$name][] = $item;
                      }
                  }
              } else {
                  if ($value instanceof NodeInterface) {
                      $nodes[$name] = $value;
                  } else {
                      $attributes[$name] = $value;
                  }
              }
          }
  
          return [$attributes, $nodes];
      }
code_tokens: private static function extract ( NodeInterface $ node ) { $ attributes = [ ] ; $ nodes = [ ] ; foreach ( self :: extractProperties ( $ node ) as $ name => $ value ) { if ( is_array ( $ value ) ) { foreach ( $ value as $ item ) { if ( $ item instanceof NodeInterface ) { $ nodes [ $ name ] [ ] = $ item ; } else { $ attributes [ $ name ] [ ] = $ item ; } } } else { if ( $ value instanceof NodeInterface ) { $ nodes [ $ name ] = $ value ; } else { $ attributes [ $ name ] = $ value ; } } } return [ $ attributes , $ nodes ] ; }
docstring: Extracts the properties of the given node.
  
  @param NodeInterface $node The node to use for the extraction.
  
  @return array An array with two indexes: the attributes and the children nodes.
docstring_tokens: Extracts the properties of the given node .