We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b15a01 commit 58e9c41Copy full SHA for 58e9c41
tests/PHPStan/Analyser/data/template-default.php
@@ -103,3 +103,34 @@ function () {
103
assertType('TemplateDefault\\FormData', $form->mapValues(new FormData));
104
assertType('stdClass', $form->mapValues());
105
};
106
+
107
+/**
108
+ * @template T
109
+ * @template U = string
110
+ */
111
+interface Foo
112
+{
113
+ /**
114
+ * @return U
115
116
+ public function get(): mixed;
117
+}
118
119
120
+ * @extends Foo<int>
121
122
+interface Bar extends Foo
123
124
125
126
127
+ * @extends Foo<int, bool>
128
129
+interface Baz extends Foo
130
131
132
133
+function (Bar $bar, Baz $baz) {
134
+ assertType('string', $bar->get());
135
+ assertType('bool', $baz->get());
136
+};
0 commit comments