We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b30da34 commit 055fb6bCopy full SHA for 055fb6b
tests/PHPStan/Analyser/nsrt/date-format.php
@@ -48,3 +48,10 @@ function (?\DateTimeImmutable $d): void {
48
assertType('DateTimeImmutable', $d->modify('+1 day'));
49
assertType('DateTimeImmutable|null', $d?->modify('+1 day'));
50
};
51
+
52
+class Foo extends \DateTimeImmutable {}
53
+class Bar extends \DateTimeImmutable {}
54
55
+function (Foo|Bar $d): void {
56
+ assertType('DateFormatReturnType\Bar|DateFormatReturnType\Foo', $d->modify('+1 day'));
57
+};
0 commit comments