Skip to content

Commit

Permalink
Merge pull request #186 from muglug/psalm-template
Browse files Browse the repository at this point in the history
Use @psalm-template annotation to avoid clashes
  • Loading branch information
Ocramius committed Mar 25, 2019
2 parents 6453eec + 807e6da commit 0852fa2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
/**
* Lazy collection that is backed by a concrete collection
*
* @template TKey of array-key
* @template T
* @psalm-template TKey of array-key
* @psalm-template T
* @template-implements Collection<TKey,T>
*/
abstract class AbstractLazyCollection implements Collection
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Common/Collections/ArrayCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* serialize a collection use {@link toArray()} and reconstruct the collection
* manually.
*
* @template TKey of array-key
* @template T
* @psalm-template TKey of array-key
* @psalm-template T
* @template-implements Collection<TKey,T>
* @template-implements Selectable<TKey,T>
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/Common/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* position unless you explicitly positioned it before. Prefer iteration with
* external iterators.
*
* @template TKey of array-key
* @template T
* @psalm-template TKey of array-key
* @psalm-template T
* @template-extends IteratorAggregate<TKey, T>
* @template-extends ArrayAccess<TKey|null, T>
*/
Expand Down Expand Up @@ -243,7 +243,7 @@ public function forAll(Closure $p);
*
* @return Collection
*
* @template U
* @psalm-template U
* @psalm-param Closure(T=):U $func
* @psalm-return Collection<TKey, U>
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Common/Collections/Selectable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* this API can implement efficient database access without having to ask the
* EntityManager or Repositories.
*
* @template TKey as array-key
* @template T
* @psalm-template TKey as array-key
* @psalm-template T
*/
interface Selectable
{
Expand Down

0 comments on commit 0852fa2

Please sign in to comment.