1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-30 04:19:30 +01:00

Docs: add missing $stmts (#433)

This commit is contained in:
Tomáš Votruba 2017-10-31 22:48:00 +01:00 committed by Nikita Popov
parent 837579a40c
commit 7f92edf3a1

View File

@ -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.
this functionality, please open an issue, so we know what to prioritize.