File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -7,22 +7,12 @@ Currently works primarly against Drupal
77
88## Installation
99
10- ### Phar (recommended)
11-
12- You may get dependency conflicts when using composer, so a phar installation is often easiest.
13-
1410```
1511wget https://github.com/smmccabe/phpdebt/releases/download/1.0.1/phpdebt.phar
1612chmod +x phpdebt.phar
1713sudo mv phpdebt.phar /usr/local/bin/phpdebt
1814```
1915
20- ### Composer
21-
22- ```
23- composer require smmccabe/phpdebt
24- ```
25-
2616## Usage and Examples
2717
2818Against a whole project
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ cp vendor/drupal/coder/coder_sniffer/Drupal/ vendor/squizlabs/php_codesniffer/src/Standards/ -r
4+ cp vendor/drupal/coder/coder_sniffer/DrupalPractice/ vendor/squizlabs/php_codesniffer/src/Standards/ -r
5+ ./vendor/bin/phar-composer build .
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ function phpMD($path, $type) {
4444
4545$ runner ->config = new Config ();
4646$ runner ->config ->files = [$ path ];
47- $ runner ->config ->standards = ['./vendor/drupal/coder/coder_sniffer/ Drupal ' ];
47+ $ runner ->config ->standards = ['Drupal ' ];
4848$ runner ->config ->extensions = [
4949 'php ' => 'PHP ' ,
5050 'module ' => 'PHP ' ,
@@ -63,7 +63,8 @@ function phpMD($path, $type) {
6363print "phpcs Drupal: " . $ faults . "\n" ;
6464$ standards_faults += $ faults ;
6565
66- $ runner ->config ->standards = ['./vendor/drupal/coder/coder_sniffer/DrupalPractice ' ];
66+ $ runner ->config ->standards = ['DrupalPractice ' ];
67+ $ runner ->init ();
6768$ faults = $ runner ->run ();
6869print "phpcs DrupalPractice: " . $ faults . "\n" ;
6970$ standards_faults += $ faults ;
You can’t perform that action at this time.
0 commit comments