A
A
Andrey Prokopyuk2015-10-08 21:12:34
PHP
Andrey Prokopyuk, 2015-10-08 21:12:34

Which PHP linters to use in precommit hook?

What linters exist in the PHP world that could be used in a precommit hook?
For example, for JS, there is JSCS to check codestyle and JSHint or ESLint to control good practices.
I would like something similar, and perhaps even more interesting.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
index0h, 2015-10-08
@index0h

https://github.com/squizlabs/PHP_CodeSniffer

M
Muhammad, 2015-10-08
@muhammad_97

Ideal option: https://github.com/FriendsOfPHP/PHP-CS-Fixer + manual how to set up the whole thing: https://coderwall.com/p/b7nova/phpunit-git-pre-com... - here an example is given with PHP Unit, but I think it will not be difficult to remake it for yourself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question