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 Oct 2, 2023
1 parent 06c6968 commit 83e48c2
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 83e48c2

Please sign in to comment.