Skip to content

Commit 02719b1

Browse files
phpstan-botclaude
andcommitted
Add regression test for #11102
Closes phpstan/phpstan#11102 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 71e33f8 commit 02719b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug11102;
4+
5+
use DateTime;
6+
use function PHPStan\Testing\assertType;
7+
8+
/** @var array{'start': DateTime|null} $details */
9+
$details = ['start' => null];
10+
11+
$startIsADateTime = $details['start'] instanceof DateTime;
12+
13+
if ($startIsADateTime) {
14+
assertType('DateTime', $details['start']);
15+
}

0 commit comments

Comments
 (0)