Skip to content

Commit

Permalink
Make template constraints examples in docs consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
HypeMC committed Sep 17, 2022
1 parent 9ed9c4b commit ee16caf
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 ee16caf

Please sign in to comment.