kerasai / robo-phpcs
PHPCS task for Robo PHP task runner.
Installs: 21 146
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- consolidation/robo: ~3 || ~4 || ~5
- kerasai/robo-config: ^1.0
Requires (Dev)
- drupal/coder: ^8.3
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2025-04-06 13:40:26 UTC
README
Robo PHPCS
Installation
composer require --dev kerasai/robo-phpcs
You'll also want standards to apply. For the example configruation below:
composer require --dev drupal/coder
Usage
vendor/bin/robo test:phpcs
robo.yml
phpcs: # Defaults to 'phpcs'. path: vendor/bin/phpcs files: src: standard: vendor/drupal/coder/coder_sniffer/Drupal tests: standard: vendor/drupal/coder/coder_sniffer/Drupal modules: path: web/modules/custom standard: vendor/drupal/coder/coder_sniffer/Drupal extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md' ignore: 'node_modules,bower_components,vendor' themes: path: web/themes/custom standard: vendor/drupal/coder/coder_sniffer/Drupal extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md' ignore: 'node_modules,bower_components,vendor' modules_practice: path: web/modules/custom standard: vendor/drupal/coder/coder_sniffer/DrupalPractice extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md' ignore: 'node_modules,bower_components,vendor' themes_practice: path: web/themes/custom standard: vendor/drupal/coder/coder_sniffer/DrupalPractice extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md' ignore: 'node_modules,bower_components,vendor'
Robofile.php:
<?php class RoboFile { use \Kerasai\Robo\Phpcs\loadTasks; /** * PHPCS code style checks */ public function testPhpcs() { $this->taskPhpcs()->run(); } }