1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

adding doc blurb about template tag order in reference to https://mobile.twitter.com/psalmphp/status/1092573808622485504

This commit is contained in:
SignpostMarv 2019-02-05 18:30:56 +00:00 committed by Matthew Brown
parent c83afc1af2
commit deb85c3cf9

View File

@ -241,6 +241,8 @@ $a->bar = 5; // this call fails
The `@template` tag allows classes and functions to implement type parameter-like functionality found in many other languages.
A notable point is that while `@template` tag order matters (i.e. for key-value pair extending), names don't matter.
As a very simple example, this function returns whatever is passed in:
```php