Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vimeo/psalm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c297b4c51be5514a9bf29393a1f69b2942375ea2
Choose a base ref
..
head repository: vimeo/psalm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dca758da83e2394c000f58b117f62a77116536d1
Choose a head ref
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayReverseReturnTypeProvider.php
Original file line number Diff line number Diff line change
@@ -94,9 +94,7 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev
/** @var int<0,max> $i */
$i = $max_len - $num_undefined;
for (; $i < $max_len; ++$i) {
$reversed_array_items[$i] = $reversed_array_items[$i]->setPossiblyUndefined(
$i >= $max_len - $num_undefined,
);
$reversed_array_items[$i] = $reversed_array_items[$i]->setPossiblyUndefined(true);
}

return new Union([$first_arg_array->setProperties($reversed_array_items)]);