From f284da2acaa5ffe004040cea5171deda15974e0c Mon Sep 17 00:00:00 2001 From: fluffycondor <62219548+fluffycondor@users.noreply.github.com> Date: Thu, 11 Aug 2022 16:45:40 +0300 Subject: [PATCH] Mark `Selectable::matching` as a mutation free It returns a new collection by contract: https://github.com/doctrine/collections/blob/1.6.x/lib/Doctrine/Common/Collections/Selectable.php#L24 --- stubs/Collections.phpstub | 1 + 1 file changed, 1 insertion(+) diff --git a/stubs/Collections.phpstub b/stubs/Collections.phpstub index 165465d..6b7ea0f 100644 --- a/stubs/Collections.phpstub +++ b/stubs/Collections.phpstub @@ -170,6 +170,7 @@ interface Collection extends Countable, IteratorAggregate, ArrayAccess interface Selectable { /** + * @psalm-mutation-free * @return Collection */ public function matching(Criteria $criteria);