We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaf5fe5 commit 23009ebCopy full SHA for 23009eb
tests/Type/PHPUnit/data/assert-function.php
@@ -20,6 +20,17 @@ public function doFoo($o): void
20
assertType(self::class, $o);
21
}
22
23
+ /**
24
+ * @template T of object
25
+ * @param object $o
26
+ * @param class-string<\DateTimeInterface> $class
27
+ */
28
+ public function assertInstanceOfWorksWithTemplate($o, $class): void
29
+ {
30
+ assertInstanceOf($class, $o);
31
+ assertType(\DateTimeInterface::class, $o);
32
+ }
33
+
34
public function arrayHasNumericKey(array $a): void {
35
assertArrayHasKey(0, $a);
36
assertType('array&hasOffset(0)', $a);
0 commit comments