Skip to content

Commit

Permalink
Merge pull request #8492 from HypeMC/consistent-docs-examples
Browse files Browse the repository at this point in the history
Make template constraints examples in docs consistent
  • Loading branch information
orklah committed Sep 18, 2022
2 parents 1f1fc47 + ee16caf commit 89b034a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/annotating_code/templated_annotations.md
Expand Up @@ -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>
*/
Expand Down
4 changes: 2 additions & 2 deletions docs/annotating_code/type_syntax/conditional_types.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/running_psalm/issues/InvalidTemplateParam.md
Expand Up @@ -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 {}

Expand Down
Expand Up @@ -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 */
Expand Down

0 comments on commit 89b034a

Please sign in to comment.