kerasai / robo-phpcs
该软件包最新版本(1.0.4)没有提供许可信息。
Robo PHP任务运行器中的PHPCS任务。
1.0.4
2022-10-26 16:17 UTC
Requires
- consolidation/robo: ~1 || ~2 || ~3 || ~4
- kerasai/robo-config: ^1.0
Requires (Dev)
- drupal/coder: ^8.3
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-09-26 20:27:11 UTC
README
Robo PHPCS
安装
composer require --dev kerasai/robo-phpcs
您还需要应用标准。以下为例子的配置文件
composer require --dev drupal/coder
用法
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(); } }