From 7f92edf3a16165965c1d3c2bb87a09b76f076823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Votruba?= Date: Tue, 31 Oct 2017 22:48:00 +0100 Subject: [PATCH] Docs: add missing $stmts (#433) --- doc/component/Pretty_printing.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index caff9f2..186c278 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -17,7 +17,7 @@ $stmts = $parser->parse($code); // MODIFY $stmts here $prettyPrinter = new PhpParser\PrettyPrinter\Standard; -$newCode = $prettyPrinter->prettyPrintFile(); +$newCode = $prettyPrinter->prettyPrintFile($stmts); ``` The pretty printer has three basic printing methods: `prettyPrint()`, `prettyPrintFile()` and @@ -89,4 +89,4 @@ $newCode = $printer->printFormatPreserving($newStmts, $oldStmts, $oldTokens); This functionality is experimental and not yet fully implemented. It should not provide incorrect code, but it may sometimes reformat more code than necessary. Open issues are tracked in [issue #344](https://github.com/nikic/PHP-Parser/issues/344). If you encounter problems while using -this functionality, please open an issue, so we know what to prioritize. \ No newline at end of file +this functionality, please open an issue, so we know what to prioritize.