original_string: public function add_class( \DOMElement &$node, $classes){
  		$classes = (array)$classes;
  		if( $node->hasAttribute('class') ){
  			$classes = array_merge($classes, explode(' ', $node->getAttribute('classs')));
  		}
  		$node->setAttribute('class', implode(' ', $classes));
  	}
code: public function add_class( \DOMElement &$node, $classes){
  		$classes = (array)$classes;
  		if( $node->hasAttribute('class') ){
  			$classes = array_merge($classes, explode(' ', $node->getAttribute('classs')));
  		}
  		$node->setAttribute('class', implode(' ', $classes));
  	}
code_tokens: public function add_class ( \ DOMElement & $ node , $ classes ) { $ classes = ( array ) $ classes ; if ( $ node -> hasAttribute ( 'class' ) ) { $ classes = array_merge ( $ classes , explode ( ' ' , $ node -> getAttribute ( 'classs' ) ) ) ; } $ node -> setAttribute ( 'class' , implode ( ' ' , $ classes ) ) ; }
docstring: Add class to element
  
  @param \DOMElement $node
  @param array|string $classes
docstring_tokens: Add class to element