I've been using locally a phpcs.xml.dist file since ages ago. That way, apart from php-cs-fixer that we also use, we can have, within the IDEs everything checker with PHP_CodeSniffer.
Recently, we applied that also to moodle-cs, so you can see the file proposal here:
I've been using locally a
phpcs.xml.dist
file since ages ago. That way, apart fromphp-cs-fixer
that we also use, we can have, within the IDEs everything checker with PHP_CodeSniffer.Recently, we applied that also to
moodle-cs
, so you can see the file proposal here:https://github.com/moodlehq/moodle-cs/blob/main/phpcs.xml.dist
Basically, it's PSR12 with a few exceptions, not controversial, and some extra rules about short arrays and other details.
Currently we are already compliant about that, so no many changes are expected apart from adding the
phpcs.xml.dist
itself.