Cees-Jan Kiewiet has a post on his site showing you how to run GrumPHP hooks in Vagrant, a tool that allows for code quality evaluation.
A couple of weeks back while attending AmsterdamPHP Mike Chernev gave a talk about GrumPHP. Very cool looking tool, but during implementation I found out it the default setup assumes running grumphp on the same machine (whether that is a VM or iron) as committing. That is a problem in my set up where all PHP related code runs in vagrant and comitting on the host using PHPStorm. Lets fix that.
The post includes the scripts you'll need to include in your Vagrant setup to execute the quality checks on commit, pre-commit and the Vagrant hook setup to run everything inside of the VM instead of locally.