From f5432a76b69655575b5d7cc5abf3b0ad1417a89a Mon Sep 17 00:00:00 2001 From: Stepan Anchugov Date: Thu, 11 Dec 2014 16:29:15 +0500 Subject: [PATCH] Add a a reference to PrettyPrinter to code generation doc The `$prettyPrinter` variable was undefined in the doc. Also, the PrettyPrinter was mentioned as `default`, but it's `Standard`, actually. --- doc/4_Code_generation.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/4_Code_generation.markdown b/doc/4_Code_generation.markdown index c75e23c..86f1543 100644 --- a/doc/4_Code_generation.markdown +++ b/doc/4_Code_generation.markdown @@ -36,13 +36,15 @@ $node = $factory->class('SomeClass') ; $stmts = array($node); -echo $prettyPrinter->prettyPrint($stmts); +$prettyPrinter = new PhpParser\PrettyPrinter\Standard(); +echo $prettyPrinter->prettyPrintFile($stmts); ``` -This will produce the following output with the default pretty printer: +This will produce the following output with the standard pretty printer: ```php