From 11a7ea92ed96345cee58b6950eb984927fb245b4 Mon Sep 17 00:00:00 2001 From: Josh Grant Date: Mon, 7 Nov 2022 11:40:33 +0000 Subject: [PATCH] Fix Collection::combine return docblock --- src/Illuminate/Collections/Collection.php | 2 +- src/Illuminate/Collections/Enumerable.php | 2 +- src/Illuminate/Collections/LazyCollection.php | 2 +- types/Support/Collection.php | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Collections/Collection.php b/src/Illuminate/Collections/Collection.php index 8bdc4219dbb5..027ae8ec8b39 100644 --- a/src/Illuminate/Collections/Collection.php +++ b/src/Illuminate/Collections/Collection.php @@ -807,7 +807,7 @@ public function mergeRecursive($items) * @template TCombineValue * * @param \Illuminate\Contracts\Support\Arrayable|iterable $values - * @return static + * @return static */ public function combine($values) { diff --git a/src/Illuminate/Collections/Enumerable.php b/src/Illuminate/Collections/Enumerable.php index a40cf4434be0..250a6b50599b 100644 --- a/src/Illuminate/Collections/Enumerable.php +++ b/src/Illuminate/Collections/Enumerable.php @@ -719,7 +719,7 @@ public function mergeRecursive($items); * @template TCombineValue * * @param \Illuminate\Contracts\Support\Arrayable|iterable $values - * @return static + * @return static */ public function combine($values); diff --git a/src/Illuminate/Collections/LazyCollection.php b/src/Illuminate/Collections/LazyCollection.php index 4efab7ec40e5..f159434acdeb 100644 --- a/src/Illuminate/Collections/LazyCollection.php +++ b/src/Illuminate/Collections/LazyCollection.php @@ -798,7 +798,7 @@ public function mergeRecursive($items) * @template TCombineValue * * @param \IteratorAggregate|array|(callable(): \Generator) $values - * @return static + * @return static */ public function combine($values) { diff --git a/types/Support/Collection.php b/types/Support/Collection.php index 9a0be8bc6817..aa1adb617ed3 100644 --- a/types/Support/Collection.php +++ b/types/Support/Collection.php @@ -602,6 +602,7 @@ function ($collection, $count) { assertType('Illuminate\Support\Collection', $collection->make(['string' => 'string'])->combine([2])); assertType('Illuminate\Support\Collection', $collection->make([1])->combine([1])); +assertType('Illuminate\Support\Collection', $collection->make(['string'])->combine(['string'])); assertType('Illuminate\Support\Collection', $collection->make([1])->union([1])); assertType('Illuminate\Support\Collection', $collection->make(['string' => 'string'])->union(['string' => 'string']));