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 de16868 commit 8a4fbdeCopy full SHA for 8a4fbde
tests/PHPStan/Analyser/nsrt/bug-12393b.php
@@ -216,6 +216,28 @@ public function doBar(): void
216
}
217
218
219
+class FooIntRangeString
220
+{
221
+
222
+ public string $foo;
223
224
+ /**
225
+ * @param int<5, 10> $b
226
+ */
227
+ public function doFoo(int $b): void
228
+ {
229
+ $this->foo = $b;
230
+ assertType('string', $this->foo); // could be numeric-string
231
+ }
232
233
+ public function doBar(): void
234
235
+ $i = rand(5, 10);
236
+ $this->foo = $i;
237
238
239
+}
240
241
class FooFloatString
242
{
243
0 commit comments