One major issue with the pre-hook so far was partially staged files,
because it used filenames for php lint. These changes will make the hook read the file contents from the index instead.
Great thanks to David Soria Parra.
This pre-commit hook utilises PHP's command-line -l (lint) option, which
checks for syntax errors. In case of an error the commit is rejected and
the error displayed.
Testing is welcome.