Composer installer for PHP_CodeSniffer coding standards
PHP
Switch branches/tags
Clone or download
Pull request Compare This branch is 51 commits behind Dealerdirect:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
src
.editorconfig
.gitattributes
.gitignore
CONTRIBUTING.md
LICENSE.md
README.md
composer.json

README.md

Dealerdirect: PHP_CodeSniffer Standards Composer Installer Plugin

Project Stage Maintenance Awesome License

Scrutinizer Dependency Status Latest Version on Packagist Packagist

This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (rulesets).

No more symbolic linking of directories, checking out repositories on specific locations and/or changing the phpcs configuration.

Note: This plugin is compatible with both version 2.x and 3.x of PHP_CodeSniffer

Usage

Add the following lines to your composer.json file:

"require-dev": {
   "squizlabs/php_codesniffer": "^2.0.0",
   "dealerdirect/phpcodesniffer-composer-installer" : "*",
   "frenck/php-compatibility": "*"
}

Developing Coding Standards

Coding standard can be developed normally, as documented by PHP_CodeSniffer, in the Coding Standard Tutorial.

Create a composer package of your coding standard by adding a composer.json file.

{
  "name" : "acme/phpcodesniffer-our-standards",
  "description" : "Package contains all coding standards of the Acme company",
  "require" : {
    "php" : ">=5.4.0,<8.0.0-dev",
    "squizlabs/php_codesniffer" : "^2.0"
  },
  "type" : "phpcodesniffer-standard"
}

Requirements:

  • The repository may contain one or more standards.
  • Each standard can have a separate directory no deeper than 3 levels from the repository root.
  • The package type must be phpcodesniffer-standard. Without this, the plugin will not trigger.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We've set up a separate document for our [contribution guidelines][contributing-guidelines].

Thank you for being involved! 😍

Authors & contributors

The original idea and setup of this repository is by Franck Nijhof, employee @ Dealerdirect.

For a full list off all author and/or contributors, check the contributors page.

Working @ Dealerdirect

Dealerdirect is always on the looking for energetic and hard working developers and devops engineers.

Interested in working at Dealerdirect? Then please be sure to check out our vacancies.

Did not find a matching vacancy? Just get in touch!

workingatdealerdirect.eu

License

The MIT License (MIT)

Copyright (c) 2016-2017 Dealerdirect B.V.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.