It’s good best practice to use linter regularly, especially as git pre-commit hook, using husky.
Reference:
PHP Projects
Reference: https://sebastiandedeyne.com/running-php-cs-fixer-on-every-commit-with-husky-and-lint-staged/
composer require --dev friendsofphp/php-cs-fixer
yarn add --dev husky lint-staged