Skip to content

Commit e93e9cc

Browse files
committed
add return fixture to mimic var int key
1 parent ff5603d commit e93e9cc

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockGetterReturnArrayFromPropertyDocblockVarRector\Fixture;
4+
5+
final class RespectIntStringKey
6+
{
7+
/**
8+
* @var array<int, string>
9+
*/
10+
private array $names = [];
11+
12+
/**
13+
* @return array
14+
*/
15+
public function getNames(): array
16+
{
17+
return $this->names;
18+
}
19+
}
20+
21+
?>
22+
-----
23+
<?php
24+
25+
namespace Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockGetterReturnArrayFromPropertyDocblockVarRector\Fixture;
26+
27+
final class RespectIntStringKey
28+
{
29+
/**
30+
* @var array<int, string>
31+
*/
32+
private array $names = [];
33+
34+
/**
35+
* @return array<int, string>
36+
*/
37+
public function getNames(): array
38+
{
39+
return $this->names;
40+
}
41+
}
42+
43+
?>

0 commit comments

Comments
 (0)