From 74b62bbbb32674dfa167e2812231bf302454e67f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 13 Aug 2019 09:00:18 -0500 Subject: [PATCH] remove unneeded code --- .../Queue/SerializesAndRestoresModelIdentifiers.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php b/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php index a7736032daaa..44e6588c939e 100644 --- a/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php +++ b/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php @@ -85,9 +85,7 @@ protected function restoreCollection($value) return new $collectionClass( collect($value->id)->map(function ($id) use ($collection) { return $collection[$id] ?? null; - })->when($collection->count() !== count($value->id), function ($collection) { - return $collection->filter(); - }) + })->filter() ); }