Update Generator.php

To comply with the docs RE namespace usage:
https://github.com/yiisoft/yii2/blob/master/docs/guide/extend-creating-extensions.md
Merge pull request #3348 from tsvetann/patch-3

[ci skip] Update Generator.php