library wondersniffer
PHP Coding Standards for WonderNetwork
wondernetwork/wondersniffer
PHP Coding Standards for WonderNetwork
- Friday, August 19, 2016
- by ellotheth
- Repository
- 4 Watchers
- 1 Stars
- 1,391 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 10 % Grown
WonderNetwork Coding Standard for PHP
WonderNetwork uses PHP_CodeSniffer to keep our code pretty. PSR-2 is the base of our standard, with a few extras thrown in. You can see
what we've added and removed in the ruleset.xml
, and check out our customizations in Sniffs
., (*1)
(The astute may notice that the code in this repo doesn't conform to our own standard. We don't care.), (*2)
How to make your code look like our code
-
Add wondersniffer
to your Composer packages:, (*3)
$ composer require --dev wondernetwork/wondersniffer
-
Update composer
:, (*4)
$ composer update
-
Add the WonderNetwork standard to your ruleset.xml
:, (*5)
<?xml version="1.0"?>
<ruleset>
<rule ref="vendor/wondernetwork/wondersniffer/WonderNetwork" />
</ruleset>
-
Run the sniffer against your codebase:, (*6)
$ ./vendor/bin/phpcs --standard=ruleset.xml your-source-code
Credits
-
MediaWiki for (unwittingly!) providing the scaffolding for a customized standard.
-
CakePHP for providing the template MediaWiki used!