fixes bugs from review
fixes bugs from review

nasimnabavi/public-test-repo,schmittjoh/cg-library,gossi/php-code-generator,gossi/php-code-generator,RobinGeuze/php-code-generator,RobinGeuze/php-code-generator,Ocramius/cg-library