= self::MIN_SPLITTABLE_FILES && self::is_size_failure( $status ); } /** * Split a batch in two, keeping every file once and the original order, so a * resumed transfer sends the same sequence. An odd count puts the extra file in the second half. * * @param string[] $batch * @return array{0: string[], 1: string[]} */ public static function halve( array $batch ): array { $batch = array_values( $batch ); $half = intdiv( count( $batch ), 2 ); return [ array_slice( $batch, 0, $half ), array_slice( $batch, $half ), ]; } }