I’ve created a Yo generator that creates a pre-built Gruntfile.js and package.json in your projects root directory which has a number of tools I’ve found useful for managing your Yii project.
GitHub Page: https://github.com/OdinsHat/generator-gruntfile-yii
Generator Package Page: https://www.npmjs.org/package/generator-gruntfile-yii
Once installed (using the instructions on either of those pages above) you can run tasks like:
grunt -h #show tasks
Run all default tasks (PHP Lint, PHP CS, PHP Mess Detector, PHPCPD, etc
Run PHP Code Sniffer on all components, controller & models
As above but only on models
As above but only on controllers
Run PHP Mess Detector on controllers
Run PHP Copy/Paste Detector on models
Run PHP Mess Detector on all compnents, controller & models
Many, many more - check the grunt file and feel free to edit to your needs.
Feel free to contribute with ideas, issues, bugs and pull requests.