File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
src/Reflection/BetterReflection/SourceStubber Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -2037,10 +2037,13 @@ services:
20372037 - PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
20382038
20392039 -
2040- class : PHPStan\BetterReflection\SourceLocator\ SourceStubber\ReflectionSourceStubber
2040+ factory : @ PHPStan\Reflection\ BetterReflection\SourceStubber\ReflectionSourceStubberFactory::create ()
20412041 autowired :
20422042 - PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
20432043
2044+ -
2045+ class : PHPStan\Reflection\BetterReflection\SourceStubber\ReflectionSourceStubberFactory
2046+
20442047 php8Lexer :
20452048 class : PhpParser\Lexer\Emulative
20462049 factory : @PHPStan\Parser\LexerFactory::createEmulative ()
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \Reflection \BetterReflection \SourceStubber ;
4+
5+ use PHPStan \BetterReflection \SourceLocator \SourceStubber \ReflectionSourceStubber ;
6+ use PHPStan \Node \Printer \Printer ;
7+ use PHPStan \Php \PhpVersion ;
8+
9+ class ReflectionSourceStubberFactory
10+ {
11+
12+ public function __construct (private Printer $ printer , private PhpVersion $ phpVersion )
13+ {
14+ }
15+
16+ public function create (): ReflectionSourceStubber
17+ {
18+ return new ReflectionSourceStubber ($ this ->printer , $ this ->phpVersion ->getVersionId ());
19+ }
20+
21+ }
You can’t perform that action at this time.
0 commit comments