From c2dd274c42b35a239670d507779e9bfe02fe66e2 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 11 Aug 2017 21:27:09 +0200 Subject: [PATCH] #6613 #6614 #6616 adding `void` return type --- lib/Doctrine/ORM/PersistentCollection.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php index 9abea4f22..4ea56f55b 100644 --- a/lib/Doctrine/ORM/PersistentCollection.php +++ b/lib/Doctrine/ORM/PersistentCollection.php @@ -710,14 +710,12 @@ final class PersistentCollection extends AbstractLazyCollection implements Selec /** * @param object[] $newObjects * - * @return void - * * Note: the only reason why this entire looping/complexity is performed via `spl_object_hash` * is because we want to prevent using `array_udiff()`, which is likely to cause very * high overhead (complexity of O(n^2)). `array_diff_key()` performs the operation in * core, which is faster than using a callback for comparisons */ - private function restoreNewObjectsInDirtyCollection(array $newObjects) + private function restoreNewObjectsInDirtyCollection(array $newObjects) : void { $loadedObjects = $this->collection->toArray(); $newObjectsByOid = \array_combine(\array_map('spl_object_hash', $newObjects), $newObjects);