15
15
class StubSourceLocatorFactory
16
16
{
17
17
18
- private \PhpParser \Parser $ parser ;
18
+ private \PhpParser \Parser $ php8Parser ;
19
19
20
20
private PhpStormStubsSourceStubber $ phpStormStubsSourceStubber ;
21
21
@@ -30,14 +30,14 @@ class StubSourceLocatorFactory
30
30
* @param string[] $stubFiles
31
31
*/
32
32
public function __construct (
33
- \PhpParser \Parser $ parser ,
33
+ \PhpParser \Parser $ php8Parser ,
34
34
PhpStormStubsSourceStubber $ phpStormStubsSourceStubber ,
35
35
OptimizedSingleFileSourceLocatorRepository $ optimizedSingleFileSourceLocatorRepository ,
36
36
Container $ container ,
37
37
array $ stubFiles
38
38
)
39
39
{
40
- $ this ->parser = $ parser ;
40
+ $ this ->php8Parser = $ php8Parser ;
41
41
$ this ->phpStormStubsSourceStubber = $ phpStormStubsSourceStubber ;
42
42
$ this ->optimizedSingleFileSourceLocatorRepository = $ optimizedSingleFileSourceLocatorRepository ;
43
43
$ this ->container = $ container ;
@@ -47,14 +47,14 @@ public function __construct(
47
47
public function create (): SourceLocator
48
48
{
49
49
$ locators = [];
50
- $ astLocator = new Locator ($ this ->parser , function (): FunctionReflector {
50
+ $ astPhp8Locator = new Locator ($ this ->php8Parser , function (): FunctionReflector {
51
51
return $ this ->container ->getService ('stubFunctionReflector ' );
52
52
});
53
53
foreach ($ this ->stubFiles as $ stubFile ) {
54
54
$ locators [] = $ this ->optimizedSingleFileSourceLocatorRepository ->getOrCreate ($ stubFile );
55
55
}
56
56
57
- $ locators [] = new PhpInternalSourceLocator ($ astLocator , $ this ->phpStormStubsSourceStubber );
57
+ $ locators [] = new PhpInternalSourceLocator ($ astPhp8Locator , $ this ->phpStormStubsSourceStubber );
58
58
59
59
return new MemoizingSourceLocator (new AggregateSourceLocator ($ locators ));
60
60
}
0 commit comments