and this is exactly what Symfony Console helpers are about: extracting logic to share it between commands