Update GeneratorCommand.php

Adds a check to prevent a foreach on an empty list of methods, which raises an Exception and stops generating the IDE Helper file.