File tree 1 file changed +2
-0
lines changed
1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 18
18
use PhpParser \ParserFactory ;
19
19
use PhpParser \PrettyPrinter \Standard ;
20
20
use PhpParser \PrettyPrinterAbstract ;
21
+ use Serafim \Contracts \Compiler \Visitor \ConstReplaceVisitor ;
21
22
use Serafim \Contracts \Compiler \Visitor \ContractsApplicatorVisitor ;
22
23
use Serafim \Contracts \Compiler \Visitor \ExceptionDecoratorVisitor ;
23
24
use Serafim \Contracts \Exception \Decorator ;
@@ -88,6 +89,7 @@ public function compile(string $pathname): string
88
89
89
90
$ traverser = new NodeTraverser ();
90
91
$ traverser ->addVisitor (new NameResolver (options: ['preserveOriginalNames ' => true ]));
92
+ $ traverser ->addVisitor (new ConstReplaceVisitor ($ pathname , 1 ));
91
93
$ traverser ->addVisitor (new ExceptionDecoratorVisitor ($ pathname ));
92
94
$ traverser ->addVisitor (new ContractsApplicatorVisitor ($ pathname , $ this ->contracts , $ this ->injector ));
93
95
You can’t perform that action at this time.
0 commit comments