mirror of
https://github.com/danog/PHP-Parser.git
synced 2025-01-20 04:36:57 +01:00
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.
This commit is contained in:
parent
800d278369
commit
f5432a76b6
@ -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
|
||||
<?php
|
||||
|
||||
abstract class SomeClass extends SomeOtherClass implements A\Few, Interfaces
|
||||
{
|
||||
protected $someProperty;
|
||||
|
Loading…
x
Reference in New Issue
Block a user