This is an extended version of the Moodle Coding style with added opinionated best practices.
composer global require andrewnicols/moodle-cs-strict
Note: This configuration depends on MDL-76272 having landed
- Create a new
.phpcs.xml
file in your repository with the content:
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="MoodleCore">
<rule ref="./phpcs.xml"/>
<rule ref="MoodleStrict"/>
</ruleset>