Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make template constraints examples in docs consistent #8492

Merged
merged 1 commit into from Sep 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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