original_string: private function prepare($text, $bonus = 0, $prependNewline = true, $appendNewline = false)
      {
          $text = ($prependNewline ? "\n" : '') . trim($text);
          if ($prependNewline) {
              $bonus++;
          }
          if ($appendNewline) {
              $text .= "\n";
          }
  
          return preg_replace("/\n( {8})?/", "\n" . str_repeat(' ', $bonus * 4), $text);
      }
code: private function prepare($text, $bonus = 0, $prependNewline = true, $appendNewline = false)
      {
          $text = ($prependNewline ? "\n" : '') . trim($text);
          if ($prependNewline) {
              $bonus++;
          }
          if ($appendNewline) {
              $text .= "\n";
          }
  
          return preg_replace("/\n( {8})?/", "\n" . str_repeat(' ', $bonus * 4), $text);
      }
code_tokens: private function prepare ( $ text , $ bonus = 0 , $ prependNewline = true , $ appendNewline = false ) { $ text = ( $ prependNewline ? "\n" : '' ) . trim ( $ text ) ; if ( $ prependNewline ) { $ bonus ++ ; } if ( $ appendNewline ) { $ text .= "\n" ; } return preg_replace ( "/\n( {8})?/" , "\n" . str_repeat ( ' ' , $ bonus * 4 ) , $ text ) ; }
docstring: Prepare PHP source code snippet for output.
  
  @param string $text
  @param int    $bonus          Additional indent level (default: 0)
  @param bool   $prependNewline Prepend a newline to the snippet? (default: true)
  @param bool   $appendNewline  Append a newline to the snippet? (default: false)
  
  @return string PHP source code snippet
docstring_tokens: Prepare PHP source code snippet for output .