Skip to content

Commit

Permalink
fix: add stub to support older Laravel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
canvural committed Dec 8, 2022
1 parent 2d9612f commit 1a11021
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion stubs/EnumeratesValues.stub
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,17 @@ use Illuminate\Support\HigherOrderCollectionProxy;
* @property-read HigherOrderCollectionProxy<'until', TValue> $until
*/
trait EnumeratesValues
{}
{
/**
* NOTE: This stub is needed to support older Laravel versions.
*
* Map a collection and flatten the result by a single level.
*
* @template TFlatMapKey of array-key
* @template TFlatMapValue
*
* @param callable(TValue, TKey): (\Illuminate\Support\Collection<TFlatMapKey, TFlatMapValue>|array<TFlatMapKey, TFlatMapValue>) $callback
* @return static<TFlatMapKey, TFlatMapValue>
*/
public function flatMap(callable $callback);
}

0 comments on commit 1a11021

Please sign in to comment.