original_string: protected function fix(\DOMNode $node, $value)
      {
          $fixed = $value;
          if ($node instanceof \DOMText) {
              $fixed = str_replace("\n", '', $fixed);
              $fixed = preg_replace('/\s+/u', ' ', $fixed);
              $fixed = str_replace('<', '&lt;', $fixed);
              $fixed = str_replace('>', '&gt;', $fixed);
          }
  
          return $fixed;
      }
code: protected function fix(\DOMNode $node, $value)
      {
          $fixed = $value;
          if ($node instanceof \DOMText) {
              $fixed = str_replace("\n", '', $fixed);
              $fixed = preg_replace('/\s+/u', ' ', $fixed);
              $fixed = str_replace('<', '&lt;', $fixed);
              $fixed = str_replace('>', '&gt;', $fixed);
          }
  
          return $fixed;
      }
code_tokens: protected function fix ( \ DOMNode $ node , $ value ) { $ fixed = $ value ; if ( $ node instanceof \ DOMText ) { $ fixed = str_replace ( "\n" , '' , $ fixed ) ; $ fixed = preg_replace ( '/\s+/u' , ' ' , $ fixed ) ; $ fixed = str_replace ( '<' , '&lt;' , $ fixed ) ; $ fixed = str_replace ( '>' , '&gt;' , $ fixed ) ; } return $ fixed ; }
docstring: Fix given value based on node type
  
  @param \DOMNode $node
  @param string $value
  @return string
docstring_tokens: Fix given value based on node type