We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73374f5 commit 1fcb7d2Copy full SHA for 1fcb7d2
tests/PHPStan/Analyser/nsrt/bug-13000.php
@@ -0,0 +1,13 @@
1
+<?php declare(strict_types = 1);
2
+
3
+namespace Bug13000;
4
5
+use function PHPStan\Testing\assertType;
6
7
+function (): void {
8
+ $r = [];
9
+ foreach (['a' => '1', 'b' => '2'] as $key => $val) {
10
+ $r[$key] = $val;
11
+ }
12
+ assertType("array{a?: '1'|'2', b?: '1'|'2'}", $r);
13
+};
0 commit comments