public static function interleaved(CommandInterface $command, $prefix) { if ($arguments = $command->getArguments()) { $length = count($arguments); for ($i = 0; $i < $length; $i += 2) { $arguments[$i] = "{$prefix}{$arguments[$i]}"; } $command->setRawArguments($arguments); } }