1515class StubSourceLocatorFactory
1616{
1717
18- private \PhpParser \Parser $ parser ;
18+ private \PhpParser \Parser $ php8Parser ;
1919
2020 private PhpStormStubsSourceStubber $ phpStormStubsSourceStubber ;
2121
@@ -30,14 +30,14 @@ class StubSourceLocatorFactory
3030 * @param string[] $stubFiles
3131 */
3232 public function __construct (
33- \PhpParser \Parser $ parser ,
33+ \PhpParser \Parser $ php8Parser ,
3434 PhpStormStubsSourceStubber $ phpStormStubsSourceStubber ,
3535 OptimizedSingleFileSourceLocatorRepository $ optimizedSingleFileSourceLocatorRepository ,
3636 Container $ container ,
3737 array $ stubFiles
3838 )
3939 {
40- $ this ->parser = $ parser ;
40+ $ this ->php8Parser = $ php8Parser ;
4141 $ this ->phpStormStubsSourceStubber = $ phpStormStubsSourceStubber ;
4242 $ this ->optimizedSingleFileSourceLocatorRepository = $ optimizedSingleFileSourceLocatorRepository ;
4343 $ this ->container = $ container ;
@@ -47,14 +47,14 @@ public function __construct(
4747 public function create (): SourceLocator
4848 {
4949 $ locators = [];
50- $ astLocator = new Locator ($ this ->parser , function (): FunctionReflector {
50+ $ astPhp8Locator = new Locator ($ this ->php8Parser , function (): FunctionReflector {
5151 return $ this ->container ->getService ('stubFunctionReflector ' );
5252 });
5353 foreach ($ this ->stubFiles as $ stubFile ) {
5454 $ locators [] = $ this ->optimizedSingleFileSourceLocatorRepository ->getOrCreate ($ stubFile );
5555 }
5656
57- $ locators [] = new PhpInternalSourceLocator ($ astLocator , $ this ->phpStormStubsSourceStubber );
57+ $ locators [] = new PhpInternalSourceLocator ($ astPhp8Locator , $ this ->phpStormStubsSourceStubber );
5858
5959 return new MemoizingSourceLocator (new AggregateSourceLocator ($ locators ));
6060 }
0 commit comments