Skip to content

Commit

Permalink
Documentation about Generics: @use above class
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistepillot committed Sep 21, 2023
1 parent 6bd91d7 commit 2b8bb09
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions website/src/_posts/generics-by-examples.md
Expand Up @@ -316,3 +316,16 @@ class Bar
use Part;
}
```

The `@use` tag can be defined into the PHPDoc above the `class` or the `use` clause. Both work the same way:

```php
/**
* @template T of Foo
* @use Part<T>
*/
class Bar
{
use Part;
}
```

0 comments on commit 2b8bb09

Please sign in to comment.