mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 05:11:39 +01:00
Rename pSafe to pNoIndent
Matches the function more closely
This commit is contained in:
parent
df17d62b40
commit
fc56da59ce
@ -70,7 +70,7 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
|
||||
// Scalars
|
||||
|
||||
public function pScalar_String(PHPParser_Node_Scalar_String $node) {
|
||||
return '\'' . $this->pSafe(addcslashes($node->value, '\'\\')) . '\'';
|
||||
return '\'' . $this->pNoIndent(addcslashes($node->value, '\'\\')) . '\'';
|
||||
}
|
||||
|
||||
public function pScalar_Encapsed(PHPParser_Node_Scalar_Encapsed $node) {
|
||||
@ -672,7 +672,7 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
|
||||
}
|
||||
|
||||
public function pStmt_InlineHTML(PHPParser_Node_Stmt_InlineHTML $node) {
|
||||
return '?>' . $this->pSafe(
|
||||
return '?>' . $this->pNoIndent(
|
||||
("\n" === $node->value[0] || "\r" === $node->value[0] ? "\n" : '')
|
||||
. $node->value
|
||||
) . '<?php ';
|
||||
|
@ -207,7 +207,7 @@ abstract class PHPParser_PrettyPrinterAbstract
|
||||
*
|
||||
* @return mixed String marked with $this->noIndentToken's.
|
||||
*/
|
||||
protected function pSafe($string) {
|
||||
protected function pNoIndent($string) {
|
||||
return str_replace("\n", "\n" . $this->noIndentToken, $string);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user