Skip to content

Commit 6f34e7d

Browse files
committed
Add phpcodesniffer-composer-installer to README
1 parent d650ca2 commit 6f34e7d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ Plugin for PHP_CodeSniffer static analysis tool that adds analysis of problemati
1414

1515
VariableAnalysis requires PHP 5.4 or higher and [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) version **3.0.2** or higher.
1616

17+
### With PHPCS Composer Installer
18+
19+
This is the easiest method.
20+
21+
First, install [phpcodesniffer-composer-installer](https://github.com/DealerDirect/phpcodesniffer-composer-installer) for your project if you have not already. This will also install PHPCS.
22+
23+
```
24+
composer require --dev dealerdirect/phpcodesniffer-composer-installer
25+
```
26+
27+
Then install these standards.
28+
29+
```
30+
composer require --dev sirbrillig/phpcs-variable-analysis
31+
```
32+
33+
It should just work after that!
34+
1735
### Standalone
1836

1937
1. Install PHP_CodeSniffer by following its [installation instructions](https://github.com/squizlabs/PHP_CodeSniffer#installation) (via Composer, Phar file, PEAR, or Git checkout).

0 commit comments

Comments
 (0)