-
-
Notifications
You must be signed in to change notification settings - Fork 394
/
Enumerable.stub
32 lines (29 loc) · 887 Bytes
/
Enumerable.stub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Illuminate\Support;
/**
* @template TKey of array-key
* @template TValue
*
* @extends \IteratorAggregate<TKey, TValue>
*/
interface Enumerable extends \Countable, \IteratorAggregate, \JsonSerializable
{
/**
* Get one or a specified number of items randomly from the collection.
*
* @param (callable(TValue): int)|int|null $number
* @return ($number is null ? TValue : static<int, TValue>)
*
* @throws \InvalidArgumentException
*/
public function random($number = null) {}
/**
* Create a collection by using this collection for keys and another for its values.
*
* @template TCombineValue
*
* @param \Illuminate\Contracts\Support\Arrayable<array-key, TCombineValue>|iterable<array-key, TCombineValue> $values
* @return static<array-key, TCombineValue>
*/
public function combine($values);
}