File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/Fixture Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 2323 )
2424 ->withAttributesSets ()
2525 ->withComposerBased (phpunit: true )
26+ ->withSets ([\Rector \Set \ValueObject \SetList::TYPE_DECLARATION_DOCBLOCKS ])
2627 ->withPhpSets ()
2728 ->withPaths ([
2829 __DIR__ . '/bin ' ,
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \Tests \TypeDeclarationDocblocks \Rector \ClassMethod \DocblockReturnArrayFromDirectArrayInstanceRector \Fixture ;
4+
5+ use PhpParser \Node ;
6+ use PhpParser \Node \Stmt \Class_ ;
7+ use PhpParser \Node \Stmt \ClassMethod ;
8+ use Rector \Rector \AbstractRector ;
9+ use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
10+
11+ final class MultipleNodeTypes extends AbstractRector
12+ {
13+ public function getNodeTypes (): array
14+ {
15+ return [Class_::class, ClassMethod::class];
16+ }
17+
18+ public function getRuleDefinition (): RuleDefinition
19+ {
20+ }
21+
22+ public function refactor (Node $ node )
23+ {
24+ }
25+ }
26+
27+ ?>
28+ -----
29+ <?php
30+
31+ namespace Rector \Tests \TypeDeclarationDocblocks \Rector \ClassMethod \DocblockReturnArrayFromDirectArrayInstanceRector \Fixture ;
32+
33+ final class MultipleNodeTypes
34+ {
35+ /**
36+ * @return array<int, array<string, int|string>>
37+ */
38+ private static function getExpectedAllOwners (): array
39+ {
40+ return [
41+ [
42+ 'key1 ' => 100 ,
43+ 'key2 ' => '-25.5% ' ,
44+ ],
45+ [
46+ 'key3 ' => 'Yes ' ,
47+ 'key4 ' => 200 ,
48+ ],
49+ ];
50+ }
51+ }
52+
53+ ?>
You can’t perform that action at this time.
0 commit comments