Merge branch 'hotfix/#6283-fix-#6253-zend-code-methodgenerator-catch-heredoc'

Close #6283
Close #6253
Fixes issue #4747 - FileGenerator now properly generates files.
cleaning up var_dump
adding test case for appending to File as this is documented
coding standard fix
Merge branch 'hotfix/#6302-fix-#4747-file-generator-properly-generates-files' into develop

Forward port #6302