Improved git precommit hook for php