From 649ee5fb3764082cef37b1f2cac698cc48eb40c8 Mon Sep 17 00:00:00 2001 From: Sonata CI Date: Fri, 4 Sep 2020 09:36:39 +0200 Subject: [PATCH] DevKit updates (#1226) --- CONTRIBUTING.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 79d91693e..3d2cd62e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,12 +94,19 @@ Please note that we try to keep phpdoc to a minimum, so if an `@param` phpdoc comment brings nothing more than the type hint and variable name already do, it SHOULD be removed. Descriptions are OPTIONAL if you want to document a type. +If you want to use pseudo-types, generics, array shapes or templates for +static-analysis, prefer the usage of `@phpstan-` annotations over classic +annotations to keep IDE support, and over `@psalm-` annotations for consistency. +Keep standard annotations if necessary. + ```php /** * @param Bar|Baz $foo * @param int $limit a crucial, highly interesting comment + * + * @phpstan-param class-string $class */ -protected function bar($foo, string $name, int $limit) +protected function bar($foo, string $class, int $limit) { // ... }