@@ -32,7 +32,7 @@ public function filter(callable $callback): MapInterface;
3232 * @psalm-param (callable(TValue,TValue):int)|null $callback
3333 * @psalm-return MapInterface<TKey,TValue>
3434 */
35- public function sort (? callable $ callback = null ): MapInterface ;
35+ public function sort (callable | null $ callback = null ): MapInterface ;
3636
3737 /**
3838 * 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;
5454 * @psalm-param (callable(TKey,TKey):int)|null $keyComparator
5555 * @psalm-return MapInterface<TKey,TValue>
5656 */
57- public function diffKeys (MapInterface $ other , ? callable $ keyComparator = null ): MapInterface ;
57+ public function diffKeys (MapInterface $ other , callable | null $ keyComparator = null ): MapInterface ;
5858
5959 /**
6060 * 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;
7777 * @psalm-param (callable(TValue,TValue):int)|null $valueComparator
7878 * @psalm-return MapInterface<TKey,TValue>
7979 */
80- public function intersect (MapInterface $ other , ? callable $ valueComparator = null ): MapInterface ;
80+ public function intersect (MapInterface $ other , callable | null $ valueComparator = null ): MapInterface ;
8181
8282 /**
8383 * 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
9090 * @psalm-param (callable(TValue,TValue):int)|null $valueComparator
9191 * @psalm-return MapInterface<TKey,TValue>
9292 */
93- public function diff (MapInterface $ other , ? callable $ valueComparator = null ): MapInterface ;
93+ public function diff (MapInterface $ other , callable | null $ valueComparator = null ): MapInterface ;
9494
9595 /**
9696 * Creates an ordered list of the values contained in this map.
@@ -100,7 +100,7 @@ public function diff(MapInterface $other, ?callable $valueComparator = null): Ma
100100 * @psalm-param (callable(TValue,TValue):int)|null $sorter
101101 * @psalm-return OrderedListInterface<TValue>
102102 */
103- public function toOrderedList (? callable $ sorter = null ): OrderedListInterface ;
103+ public function toOrderedList (callable | null $ sorter = null ): OrderedListInterface ;
104104
105105 /**
106106 * 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);
165165 * @psalm-return MapInterface<TKey,TValue>
166166 * @psalm-param (callable(TValue,TValue):int)|null $valueComparator
167167 */
168- public function intersectAssoc (MapInterface $ other , ? callable $ valueComparator = null ): MapInterface ;
168+ public function intersectAssoc (MapInterface $ other , callable | null $ valueComparator = null ): MapInterface ;
169169
170170 /**
171171 * 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 =
176176 * @psalm-return MapInterface<TKey,TValue>
177177 * @psalm-param (callable(TKey,TKey):int)|null $keyComparator
178178 */
179- public function intersectUsingKeys (MapInterface $ other , ? callable $ keyComparator = null ): MapInterface ;
179+ public function intersectUsingKeys (MapInterface $ other , callable | null $ keyComparator = null ): MapInterface ;
180180
181181 /**
182182 * 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
192192 */
193193 public function intersectUserAssoc (
194194 MapInterface $ other ,
195- ? callable $ valueComparator = null ,
196- ? callable $ keyComparator = null
195+ callable | null $ valueComparator = null ,
196+ callable | null $ keyComparator = null ,
197197 ): MapInterface ;
198198
199199 /**
@@ -247,7 +247,7 @@ public function forAll(callable $callback): ForAllPromiseInterface;
247247 *
248248 * @psalm-return MapInterface<TKey,TValue>
249249 */
250- public function sortByKey (? callable $ sorter = null ): MapInterface ;
250+ public function sortByKey (callable | null $ sorter = null ): MapInterface ;
251251
252252 /**
253253 * Joins all the items together.
@@ -274,7 +274,7 @@ public function keyExchange(callable $keyGenerator): MapInterface;
274274 *
275275 * @psalm-return non-empty-array<TKey,TValue>|null
276276 */
277- public function jsonSerialize (): ? array ;
277+ public function jsonSerialize (): array | null ;
278278
279279 /**
280280 * Returns a native array equivalent of the {@see OrderedListInterface} or the {@see MapInterface}.
0 commit comments