original_string: public function evaluate($new, $current) {
          switch ($new->tagName) {
              case 'li':
                  return $this->handleLI($new, $current);
              case 'dt':
              case 'dd':
                  return $this->handleDT($new, $current);
              case 'rt':
              case 'rp':
                  return $this->handleRT($new, $current);
              case 'optgroup':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'optgroup'
                  ));
              case 'option':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'option',
                              'optgroup'
                  ));
              case 'tr':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'tr'
                  ));
              case 'td':
              case 'th':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'th',
                              'td'
                  ));
              case 'tbody':
              case 'thead':
              case 'tfoot':
              case 'table': // Spec isn't explicit about this, but it's necessary.
  
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'thead',
                              'tfoot',
                              'tbody'
                  ));
          }
  
          return $current;
      }
code: public function evaluate($new, $current) {
          switch ($new->tagName) {
              case 'li':
                  return $this->handleLI($new, $current);
              case 'dt':
              case 'dd':
                  return $this->handleDT($new, $current);
              case 'rt':
              case 'rp':
                  return $this->handleRT($new, $current);
              case 'optgroup':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'optgroup'
                  ));
              case 'option':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'option',
                              'optgroup'
                  ));
              case 'tr':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'tr'
                  ));
              case 'td':
              case 'th':
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'th',
                              'td'
                  ));
              case 'tbody':
              case 'thead':
              case 'tfoot':
              case 'table': // Spec isn't explicit about this, but it's necessary.
  
                  return $this->closeIfCurrentMatches($new, $current, array(
                              'thead',
                              'tfoot',
                              'tbody'
                  ));
          }
  
          return $current;
      }
code_tokens: public function evaluate ( $ new , $ current ) { switch ( $ new -> tagName ) { case 'li' : return $ this -> handleLI ( $ new , $ current ) ; case 'dt' : case 'dd' : return $ this -> handleDT ( $ new , $ current ) ; case 'rt' : case 'rp' : return $ this -> handleRT ( $ new , $ current ) ; case 'optgroup' : return $ this -> closeIfCurrentMatches ( $ new , $ current , array ( 'optgroup' ) ) ; case 'option' : return $ this -> closeIfCurrentMatches ( $ new , $ current , array ( 'option' , 'optgroup' ) ) ; case 'tr' : return $ this -> closeIfCurrentMatches ( $ new , $ current , array ( 'tr' ) ) ; case 'td' : case 'th' : return $ this -> closeIfCurrentMatches ( $ new , $ current , array ( 'th' , 'td' ) ) ; case 'tbody' : case 'thead' : case 'tfoot' : case 'table' : // Spec isn't explicit about this, but it's necessary. return $ this -> closeIfCurrentMatches ( $ new , $ current , array ( 'thead' , 'tfoot' , 'tbody' ) ) ; } return $ current ; }
docstring: Evaluate the rule for the current tag name.
  
  This may modify the existing DOM.
  
  @return \DOMElement The new Current DOM element.
docstring_tokens: Evaluate the rule for the current tag name .