Skip to content

Commit fd0a70a

Browse files
committed
test
1 parent 9ff8d49 commit fd0a70a

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,4 +1305,9 @@ public function testBug5946(): void
13051305
]);
13061306
}
13071307

1308+
public function testBug9669(): void
1309+
{
1310+
$this->analyse([__DIR__ . '/data/bug-9669.php'], []);
1311+
}
1312+
13081313
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace Bug9669;
4+
5+
class HelloWorld
6+
{
7+
/**
8+
* @param array<int, array{a: string}> $sets
9+
*
10+
* @return array<int, array{a: string, b: bool}>
11+
*/
12+
public function sayHello(array $sets): array
13+
{
14+
foreach ($sets as &$set) {
15+
$set['b'] = false;
16+
}
17+
18+
return $sets;
19+
}
20+
}

0 commit comments

Comments
 (0)