1313
1414This composer installer plugin allows for easy installation of [ PHP_CodeSniffer] [ codesniffer ]  coding standards (rulesets).
1515
16- No more symbolic linking of directories, checking out repositories on specific locations and/ or changing
16+ No more symbolic linking of directories, checking out repositories on specific locations or changing
1717the ` phpcs `  configuration.
1818
1919_ Note: This plugin is compatible with both version 2.x and 3.x of_  [ PHP_CodeSniffer] [ codesniffer ] 
@@ -30,21 +30,49 @@ That's it.
3030
3131### How it works  
3232
33- Basically this plugin executes the following steps:
33+ Basically,  this plugin executes the following steps:
3434
3535-  This plugin search for ` phpcodesniffer-standard `  packages in all of your currently installed Composer packages.
3636-  Matching packages and the project itself are scanned for PHP_CodeSniffer rulesets.
3737-  The plugin will call PHP_CodeSniffer and configure the ` installed_paths `  option.
3838
39- ### Calling the plugin directly    
39+ ### Example project  
4040
41- In some circumstances it is desirable to call this plugin's functionality 
41+ The following is an example Composer project and has included
42+ multiple ` phpcodesniffer-standard `  packages.
43+ 
44+ ``` json 
45+ {
46+     "name" : " dealerdirect/example-project" 
47+     "description" : " Just an example project" 
48+     "type" : " project" 
49+     "require" : {},
50+     "require-dev" : {
51+         "dealerdirect/phpcodesniffer-composer-installer" : " *" 
52+         "object-calisthenics/phpcs-calisthenics-rules" : " *" 
53+         "wimg/php-compatibility" : " *" 
54+         "wp-coding-standards/wpcs" : " *" 
55+     }
56+ }
57+ ``` 
58+ 
59+ After running ` composer install `  PHP_CodeSniffer just works:
60+ 
61+ ``` bash 
62+ $ ./vendor/bin/phpcs -i
63+ The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz, Zend, PHPCompatibility, WordPress,
64+ WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress-VIP
65+ ``` 
66+ 
67+ ### Calling the plugin directly  
68+ 
69+ In some circumstances, it is desirable to call this plugin's functionality
4270directly. For instance, during development or in [ CI] [ definition-ci ]  environments.
4371
4472As the plugin requires Composer to work, direct calls need to be wired through a
4573project's ` composer.json ` .
4674
47- This is done by adding a call to the ` Plugin::run `  function in the ` script `   
75+ This is done by adding a call to the ` Plugin::run `  function in the ` script ` 
4876section of the ` composer.json ` :
4977
5078``` json 
@@ -58,7 +86,7 @@ section of the `composer.json`:
5886
5987``` 
6088
61- The command can then be called using ` composer run-script install-codestandards `  or  
89+ The command can then be called using ` composer run-script install-codestandards `  or
6290referenced from other script configurations, as follows:
6391
6492``` json 
@@ -75,15 +103,15 @@ referenced from other script configurations, as follows:
75103
76104``` 
77105
78- For more details about Composer scripts, please refer to [ the section on scripts  
106+ For more details about Composer scripts, please refer to [ the section on scripts
79107in the Composer manual] [ composer-manual-scripts ] .
80108
81109### Caveats  
82110
83- When this plugin is installed globally, composer will load the _ global_  plugin rather  
84- than the one from the local repository. Despite [ this behaviour  being documented  
85- in the composer manual] [ using-composer-plugins ] , it could potentially cause confusion 
86- as an version of the plugin could be run other than  the version  specified by the project.
111+ When this plugin is installed globally, composer will load the _ global_  plugin rather
112+ than the one from the local repository. Despite [ this behavior  being documented
113+ in the composer manual] [ using-composer-plugins ] , it could potentially confuse 
114+ as an other  version of the plugin could be run and not  the one  specified by the project.
87115
88116## Developing Coding Standards  
89117
@@ -138,7 +166,7 @@ Then please be sure to check out [our vacancies][vacancies].
138166
139167Did not find a matching vacancy? Just [ get in touch] [ get-in-touch ] !
140168
141- [ workingatdealerdirect.eu ] [ workingatdealerdirecteu ] 
169+ [ dealerdirect.com ] [ dealerdirectcom ] 
142170
143171## License  
144172
@@ -166,14 +194,15 @@ THE SOFTWARE.
166194
167195[ awesome-shield ] : https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg 
168196[ changelog ] : https://github.com/DealerDirect/phpcodesniffer-composer-installer/releases 
169- [ composer ] : https://getcomposer.org/ 
170- [ composer-manual-scripts ] : https://getcomposer.org/doc/articles/scripts.md 
171197[ codesniffer ] : https://github.com/squizlabs/PHP_CodeSniffer 
198+ [ composer-manual-scripts ] : https://getcomposer.org/doc/articles/scripts.md 
199+ [ composer ] : https://getcomposer.org/ 
172200[ contributing-guidelines ] : CONTRIBUTING.md 
173201[ contributors ] : https://github.com/dealerdirect/phpcodesniffer-composer-installer/graphs/contributors 
202+ [ dealerdirectcom ] : http://www.dealerdirect.com/en 
174203[ definition-ci ] : https://en.wikipedia.org/wiki/Continuous_integration 
175204[ frenck ] : https://github.com/frenck 
176- [ get-in-touch ] : http ://workingatdealerdirect.eu/open-sollicitatie/ 
205+ [ get-in-touch ] : https ://www.dealerdirect.com/en/contact 
177206[ license-shield ] : https://img.shields.io/github/license/dealerdirect/phpcodesniffer-composer-installer.svg 
178207[ maintenance-shield ] : https://img.shields.io/maintenance/yes/2017.svg 
179208[ packagist-shield ] : https://img.shields.io/packagist/dt/dealerdirect/phpcodesniffer-composer-installer.svg 
@@ -187,8 +216,6 @@ THE SOFTWARE.
187216[ travis ] : https://travis-ci.org/DealerDirect/phpcodesniffer-composer-installer 
188217[ tutorial ] : https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial 
189218[ using-composer-plugins ] : https://getcomposer.org/doc/articles/plugins.md#using-plugins 
190- [ vacancies ] : http ://workingatdealerdirect.eu/?post_type=vacancy&s=&department=99 
219+ [ vacancies ] : https ://www.dealerdirect.com/en/vacancies 
191220[ versioneye-shield ] : https://www.versioneye.com/user/projects/580be0d1d65a7716b613a790/badge.svg 
192221[ versioneye ] : https://www.versioneye.com/user/projects/580be0d1d65a7716b613a790 
193- [ workingatdealerdirecteu ] : http://www.workingatdealerdirect.eu 
194- 
0 commit comments