-
Notifications
You must be signed in to change notification settings - Fork 506
/
Copy patharrayFunctions.stub
89 lines (81 loc) · 1.57 KB
/
arrayFunctions.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* @template TIn of mixed
* @template TReturn of mixed
*
* @param array<TIn> $one
* @param callable(TReturn, TIn): TReturn $two
* @param TReturn $three
*
* @return TReturn
*/
function array_reduce(
array $one,
callable $two,
$three = null
) {}
/**
* @template T of mixed
*
* @param array<T> $array
* @return ($array is non-empty-array ? non-empty-list<T> : list<T>)
*/
function array_values(array $array): array {}
/**
* @template TKey as (int|string)
* @template T
* @template TArray as array<TKey,T>
*
* @param TArray $array
* @param callable(T,T):int $callback
*/
function uasort(array &$array, callable $callback): bool
{}
/**
* @template T
* @template TArray as array<T>
*
* @param TArray $array
* @param callable(T,T):int $callback
*/
function usort(array &$array, callable $callback): bool
{}
/**
* @template TKey as (int|string)
* @template T
* @template TArray as array<TKey,T>
*
* @param TArray $array
* @param callable(TKey,TKey):int $callback
*/
function uksort(array &$array, callable $callback): bool
{
}
/**
* @template T of mixed
*
* @param array<T> $one
* @param array<T> $two
* @param callable(T, T): int $three
*/
function array_udiff(
array $one,
array $two,
callable $three
): int {}
/**
* @template T
* @param array<T> $one
* @param array<T> $two
* @param callable(T, T): int $three
*/
function array_uintersect(
array $one,
array $two,
callable $three
): int {}
/**
* @param array<array-key, mixed> $value
* @return ($value is list ? true : false)
*/
function array_is_list(array $value): bool {}