File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 15
15
namespace Humbug \PhpScoper \PhpParser \Printer ;
16
16
17
17
use PhpParser \Node ;
18
+ use PhpParser \Token ;
18
19
19
20
interface Printer
20
21
{
21
22
/**
22
- * @param Node[] $newStmts
23
- * @param Node[] $oldStmts
24
- * @param array<mixed> $oldTokens
23
+ * @param Node[] $newStmts
24
+ * @param Node[] $oldStmts
25
+ * @param Token[] $oldTokens
25
26
*/
26
27
public function print (array $ newStmts , array $ oldStmts , array $ oldTokens ): string ;
27
28
}
Original file line number Diff line number Diff line change 14
14
15
15
namespace Humbug \PhpScoper \PhpParser \Printer ;
16
16
17
- use PhpParser \PrettyPrinterAbstract ;
17
+ use PhpParser \PrettyPrinter ;
18
18
19
19
final readonly class StandardPrinter implements Printer
20
20
{
21
- public function __construct (private PrettyPrinterAbstract $ decoratedPrinter )
21
+ public function __construct (private PrettyPrinter $ decoratedPrinter )
22
22
{
23
23
}
24
24
25
25
public function print (array $ newStmts , array $ oldStmts , array $ oldTokens ): string
26
26
{
27
- return $ this ->decoratedPrinter ->prettyPrintFile ($ newStmts )."\n" ;
27
+ $ printedStatements = $ this ->decoratedPrinter ->prettyPrintFile ($ newStmts );
28
+
29
+ return $ printedStatements ."\n" ;
28
30
}
29
31
}
You can’t perform that action at this time.
0 commit comments