diff --git a/docs/annotating_code/templated_annotations.md b/docs/annotating_code/templated_annotations.md index f0b152480..2cb89f93b 100644 --- a/docs/annotating_code/templated_annotations.md +++ b/docs/annotating_code/templated_annotations.md @@ -120,7 +120,7 @@ Psalm also allows you to parameterize class types ```php $class * @return T */ @@ -128,9 +128,10 @@ function instantiator(string $class) { return new $class(); } +/** @psalm-consistent-constructor */ class Foo {} -$a = instantiator(Foo::class); // Psalm knows the result is an object of type Foo +$_a = instantiator(Foo::class); // Psalm knows the result is an object of type Foo ``` ## Template inheritance