Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
DevKit updates (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored Sep 4, 2020
1 parent 3822ff4 commit 4ff7d26
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 4ff7d26

Please sign in to comment.