File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -1612,6 +1612,10 @@ services:
16121612
16131613 stubPhpDocProvider :
16141614 class : PHPStan\PhpDoc\StubPhpDocProvider
1615+ factory : @PHPStan\PhpDoc\StubPhpDocProviderFactory::create ()
1616+
1617+ -
1618+ class : PHPStan\PhpDoc\StubPhpDocProviderFactory
16151619 arguments :
16161620 stubFiles : %stubFiles%
16171621
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \PhpDoc ;
4+
5+ use PHPStan \Parser \Parser ;
6+ use PHPStan \Type \FileTypeMapper ;
7+
8+ class StubPhpDocProviderFactory
9+ {
10+
11+ private \PHPStan \Parser \Parser $ parser ;
12+
13+ private \PHPStan \Type \FileTypeMapper $ fileTypeMapper ;
14+
15+ /** @var string[] */
16+ private array $ stubFiles ;
17+
18+ /**
19+ * @param \PHPStan\Parser\Parser $parser
20+ * @param string[] $stubFiles
21+ */
22+ public function __construct (
23+ Parser $ parser ,
24+ FileTypeMapper $ fileTypeMapper ,
25+ array $ stubFiles
26+ )
27+ {
28+ $ this ->parser = $ parser ;
29+ $ this ->fileTypeMapper = $ fileTypeMapper ;
30+ $ this ->stubFiles = $ stubFiles ;
31+ }
32+
33+ public function create (): StubPhpDocProvider
34+ {
35+ return new StubPhpDocProvider (
36+ $ this ->parser ,
37+ $ this ->fileTypeMapper ,
38+ $ this ->stubFiles
39+ );
40+ }
41+
42+ }
You can’t perform that action at this time.
0 commit comments