Skip to content
PHP coding standards for WonderNetwork
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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.

(The astute may notice that the code in this repo doesn't conform to our own standard. We don't care.)

How to make your code look like our code

  1. Add wondersniffer to your Composer packages:
$ composer require --dev wondernetwork/wondersniffer
  1. Update composer:
$ composer update
  1. Add the WonderNetwork standard to your ruleset.xml:
<?xml version="1.0"?>
    <rule ref="vendor/wondernetwork/wondersniffer/WonderNetwork" />
  1. Run the sniffer against your codebase:
$ ./vendor/bin/phpcs --standard=ruleset.xml your-source-code


  • MediaWiki for (unwittingly!) providing the scaffolding for a customized standard.
  • CakePHP for providing the template MediaWiki used!
You can’t perform that action at this time.