Apply Moodle coding standards (PSR-12 with exceptions) to PHP code. Validates style, naming conventions, PHPDoc, and type hints.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Apply Moodle coding standards (PSR-12 + exceptions) to PHP code.
Check code against Moodle standards:
[] only)else if not elseif?> tagEnsure proper naming:
$lowercase (no underscores between words)component_function_name() (Frankenstyle)lowercase_with_underscoresCOMPONENT_CONSTANT_NAMEGenerate required documentation:
@package tag (MANDATORY)@param with types@return descriptionAdd mandatory type declarations:
?type)vendor/bin/phpcs --standard=moodle path/to/file.php
/**
* @package mod_myplugin
*/
// Before
$arr = array('a', 'b');
// After
$arr = ['a', 'b'];
// Before
} elseif ($x) {
// After
} else if ($x) {