File tree Expand file tree Collapse file tree
rules-tests/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector/Fixture Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \Tests \TypeDeclaration \Rector \ClassMethod \ParamTypeByMethodCallTypeRector \Fixture ;
4+
5+ use Rector \Tests \TypeDeclaration \Rector \ClassMethod \ParamTypeByMethodCallTypeRector \Source \SomeTypedService ;
6+
7+ final class AlsoArrowFunction
8+ {
9+ public function __construct (
10+ private SomeTypedService $ someTypedService
11+ ) {
12+ }
13+
14+ public function go ()
15+ {
16+ $ closure = fn ($ value ) => $ this ->someTypedService ->run ($ value );
17+ }
18+ }
19+
20+ ?>
21+ -----
22+ <?php
23+
24+ namespace Rector \Tests \TypeDeclaration \Rector \ClassMethod \ParamTypeByMethodCallTypeRector \Fixture ;
25+
26+ use Rector \Tests \TypeDeclaration \Rector \ClassMethod \ParamTypeByMethodCallTypeRector \Source \SomeTypedService ;
27+
28+ final class AlsoArrowFunction
29+ {
30+ public function __construct (
31+ private SomeTypedService $ someTypedService
32+ ) {
33+ }
34+
35+ public function go ()
36+ {
37+ $ closure = fn (string $ value ) => $ this ->someTypedService ->run ($ value );
38+ }
39+ }
40+
41+ ?>
You can’t perform that action at this time.
0 commit comments