mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
* poc php-cs-fixer * PSR2 for now * PSR12 + array short * move php-cs-fixer stuff in tests/php-code-style * add README * fix php-cs-fixer move into php-code-style * illustrate code reformatting on webservices folder * phpstan: change composer php requirements * indent with tabs + inception style applied everywhere even php-cs-fixer itself * use tabs for code style indentation * format concat with spaces * finalize included/excluded folders to formatting tool * add trailing_comma_in_multiline option * adapt composer.json requirements * Revert changes on webservices folder
564 B
564 B
Code formatting tool used by iTop is PHP-CS-Fixer: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/master
to check code style issues (no path provided means whole iTop code base):
cd tests/php-code-style/; composer install; cd -
tests/php-code-style/vendor/bin/php-cs-fixer check --config tests/php-code-style/.php-cs-fixer.dist.php [PATH]
to respect iTop code standards and re-format (no path provided means whole iTop code base):
tests/php-code-style/vendor/bin/php-cs-fixer fix --config tests/php-code-style/.php-cs-fixer.dist.php [PATH]