1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Merge pull request #8492 from HypeMC/consistent-docs-examples

Make template constraints examples in docs consistent
This commit is contained in:
orklah 2022-09-18 11:23:21 +02:00 committed by GitHub
commit 89b034acaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -229,7 +229,7 @@ Templated types aren't limited to key-value pairs, and you can re-use templates
```php
<?php
/**
* @template T0 as array-key
* @template T0 of array-key
*
* @template-implements IteratorAggregate<T0, int>
*/

View File

@ -18,7 +18,7 @@ Let's suppose we want to make a userland implementation of PHP's numeric additio
<?php
/**
* @template T as int|float
* @template T of int|float
* @param T $a
* @param T $b
* @return int|float
@ -57,7 +57,7 @@ class A {
const TYPE_INT = 1;
/**
* @template T as int
* @template T of int
* @param T $i
* @psalm-return (
* T is self::TYPE_STRING

View File

@ -6,7 +6,7 @@ Emitted when using the `@extends`/`@implements` annotation to extend a class tha
<?php
/**
* @template T as object
* @template T of object
*/
class Base {}

View File

@ -42,7 +42,7 @@ You can either broaden the type or you could, in certain situations, use templat
<?php
/**
* @template T as string|null
* @template T of string|null
*/
abstract class A {
/** @var T */