We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b08f99b commit c3a5945Copy full SHA for c3a5945
tests/PHPStan/Analyser/nsrt/date-format.php
@@ -53,8 +53,11 @@ function (?\DateTimeImmutable $d): void {
53
};
54
55
class Foo extends \DateTimeImmutable {}
56
-class Bar extends \DateTimeImmutable {}
+class Bar {
57
+ /** @return string */
58
+ public function modify($string) {}
59
+}
60
61
function (Foo|Bar $d): void {
- assertType('DateFormatReturnType\Bar|DateFormatReturnType\Foo', $d->modify('+1 day'));
62
+ assertType('DateFormatReturnType\Foo|string', $d->modify('+1 day'));
63
0 commit comments