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:
2037
2037
- PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
2038
2038
2039
2039
-
2040
- class : PHPStan\BetterReflection\SourceLocator\ SourceStubber\ReflectionSourceStubber
2040
+ factory : @ PHPStan\Reflection\ BetterReflection\SourceStubber\ReflectionSourceStubberFactory::create ()
2041
2041
autowired :
2042
2042
- PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
2043
2043
2044
+ -
2045
+ class : PHPStan\Reflection\BetterReflection\SourceStubber\ReflectionSourceStubberFactory
2046
+
2044
2047
php8Lexer :
2045
2048
class : PhpParser\Lexer\Emulative
2046
2049
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