Skip to content

Commit

Permalink
DevKit updates (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Sep 4, 2020
1 parent 7c869cc commit 649ee5f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
// ...
}
Expand Down

0 comments on commit 649ee5f

Please sign in to comment.