@@ -32,7 +32,7 @@ public function filter(callable $callback): MapInterface;
32
32
* @psalm-param (callable(TValue,TValue):int)|null $callback
33
33
* @psalm-return MapInterface<TKey,TValue>
34
34
*/
35
- public function sort (? callable $ callback = null ): MapInterface ;
35
+ public function sort (callable | null $ callback = null ): MapInterface ;
36
36
37
37
/**
38
38
* Merges all maps together. Duplications are being overridden in the order they are being passed to this method.
@@ -54,7 +54,7 @@ public function merge(MapInterface ...$stack): MapInterface;
54
54
* @psalm-param (callable(TKey,TKey):int)|null $keyComparator
55
55
* @psalm-return MapInterface<TKey,TValue>
56
56
*/
57
- public function diffKeys (MapInterface $ other , ? callable $ keyComparator = null ): MapInterface ;
57
+ public function diffKeys (MapInterface $ other , callable | null $ keyComparator = null ): MapInterface ;
58
58
59
59
/**
60
60
* Converts the items of this map to a new map of items with the return value of the provided callback.
@@ -77,7 +77,7 @@ public function map(callable $callback): MapInterface;
77
77
* @psalm-param (callable(TValue,TValue):int)|null $valueComparator
78
78
* @psalm-return MapInterface<TKey,TValue>
79
79
*/
80
- public function intersect (MapInterface $ other , ? callable $ valueComparator = null ): MapInterface ;
80
+ public function intersect (MapInterface $ other , callable | null $ valueComparator = null ): MapInterface ;
81
81
82
82
/**
83
83
* Creates a diff of this map and the provided map while using the provided value comparator.
@@ -90,7 +90,7 @@ public function intersect(MapInterface $other, ?callable $valueComparator = null
90
90
* @psalm-param (callable(TValue,TValue):int)|null $valueComparator
91
91
* @psalm-return MapInterface<TKey,TValue>
92
92
*/
93
- public function diff (MapInterface $ other , ? callable $ valueComparator = null ): MapInterface ;
93
+ public function diff (MapInterface $ other , callable | null $ valueComparator = null ): MapInterface ;
94
94
95
95
/**
96
96
* Creates an ordered list of the values contained in this map.
@@ -100,7 +100,7 @@ public function diff(MapInterface $other, ?callable $valueComparator = null): Ma
100
100
* @psalm-param (callable(TValue,TValue):int)|null $sorter
101
101
* @psalm-return OrderedListInterface<TValue>
102
102
*/
103
- public function toOrderedList (? callable $ sorter = null ): OrderedListInterface ;
103
+ public function toOrderedList (callable | null $ sorter = null ): OrderedListInterface ;
104
104
105
105
/**
106
106
* Removes a specific element from the list. In case the element was stored multiple times, all occurrences are being
@@ -165,7 +165,7 @@ public function get(string $key);
165
165
* @psalm-return MapInterface<TKey,TValue>
166
166
* @psalm-param (callable(TValue,TValue):int)|null $valueComparator
167
167
*/
168
- public function intersectAssoc (MapInterface $ other , ? callable $ valueComparator = null ): MapInterface ;
168
+ public function intersectAssoc (MapInterface $ other , callable | null $ valueComparator = null ): MapInterface ;
169
169
170
170
/**
171
171
* Creates an associative intersection of this map and the provided map using the provided key comparator.
@@ -176,7 +176,7 @@ public function intersectAssoc(MapInterface $other, ?callable $valueComparator =
176
176
* @psalm-return MapInterface<TKey,TValue>
177
177
* @psalm-param (callable(TKey,TKey):int)|null $keyComparator
178
178
*/
179
- public function intersectUsingKeys (MapInterface $ other , ? callable $ keyComparator = null ): MapInterface ;
179
+ public function intersectUsingKeys (MapInterface $ other , callable | null $ keyComparator = null ): MapInterface ;
180
180
181
181
/**
182
182
* Creates an associative intersection of this map and the provided map using the provided value comparator.
@@ -192,8 +192,8 @@ public function intersectUsingKeys(MapInterface $other, ?callable $keyComparator
192
192
*/
193
193
public function intersectUserAssoc (
194
194
MapInterface $ other ,
195
- ? callable $ valueComparator = null ,
196
- ? callable $ keyComparator = null
195
+ callable | null $ valueComparator = null ,
196
+ callable | null $ keyComparator = null ,
197
197
): MapInterface ;
198
198
199
199
/**
@@ -247,7 +247,7 @@ public function forAll(callable $callback): ForAllPromiseInterface;
247
247
*
248
248
* @psalm-return MapInterface<TKey,TValue>
249
249
*/
250
- public function sortByKey (? callable $ sorter = null ): MapInterface ;
250
+ public function sortByKey (callable | null $ sorter = null ): MapInterface ;
251
251
252
252
/**
253
253
* Joins all the items together.
@@ -274,7 +274,7 @@ public function keyExchange(callable $keyGenerator): MapInterface;
274
274
*
275
275
* @psalm-return non-empty-array<TKey,TValue>|null
276
276
*/
277
- public function jsonSerialize (): ? array ;
277
+ public function jsonSerialize (): array | null ;
278
278
279
279
/**
280
280
* Returns a native array equivalent of the {@see OrderedListInterface} or the {@see MapInterface}.
0 commit comments