Handler/FormShiftItemHandler.php
private static function up(array $array, int $item): array
    {
        if ($item > 0 && $item < \count($array)) {
            $b = \array_slice($array, 0, $item - 1, true);
            $b[] = $array[$item];
            $b[] = $array[$item - 1];
            $b += \array_slice($array, $item + 1, \count($array), true);

            return $b;
        }

        return $array;
    }
private static function up(array $array, int $item): array
    {
        if ($item > 0 && $item < \count($array)) {
            $b = \array_slice($array, 0, $item - 1, true);
            $b[] = $array[$item];
            $b[] = $array[$item - 1];
            $b += \array_slice($array, $item + 1, \count($array), true);

            return $b;
        }

        return $array;
    }
Shifts an item in an array one up.

@param array $array
@param int   $item

@return array