Skip to content

Commit

Permalink
Fix phpdoc return type for Collection::partition (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Mar 6, 2022
1 parent 5ad3f3b commit fd4ac72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/Common/Collections/Collection.php
Expand Up @@ -239,7 +239,7 @@ public function map(Closure $func);
* @param Closure $p The predicate on which to partition.
* @psalm-param Closure(TKey=, T=):bool $p
*
* @return Collection<mixed> An array with two elements. The first element contains the collection
* @return Collection<mixed>[] An array with two elements. The first element contains the collection
* of elements where the predicate returned TRUE, the second element
* contains the collection of elements where the predicate returned FALSE.
* @psalm-return array{0: Collection<TKey, T>, 1: Collection<TKey, T>}
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon.dist
Expand Up @@ -9,9 +9,6 @@ parameters:
paths:
- 'lib/Doctrine/Common/Collections/ArrayCollection.php'
- 'lib/Doctrine/Common/Collections/Criteria.php'
-
message: '~Array \(array\<TKey of \(int\|string\), T\>\) does not accept key int\.~'
path: 'lib/Doctrine/Common/Collections/ArrayCollection.php'
-
message: '~Parameter #1 \$key of method Doctrine\\Common\\Collections\\ArrayCollection<TKey of \(int\|string\),T>::set\(\) expects TKey of \(int\|string\), int\|string given\.~'
path: 'lib/Doctrine/Common/Collections/ArrayCollection.php'

0 comments on commit fd4ac72

Please sign in to comment.