Skip to content

Latest commit

 

History

History
51 lines (26 loc) · 1.24 KB

README.md

File metadata and controls

51 lines (26 loc) · 1.24 KB

A5sys PHP CodeSniffer Coding Standard

Requirements

This standard requires phpcs version 3. It does not work with version 2.

Installation

Composer

This standard can be installed with the Composer dependency manager.

  1. Install Composer

  2. Install the coding standard as a dependency of your project

     composer require --dev A5sys/A5sys-coding-standard
    
  3. Add the coding standard to the PHP_CodeSniffer install path

     vendor/bin/phpcs --config-set installed_paths vendor/A5sys/A5sys-coding-standard
    
  4. Check the installed coding standards for "A5sys"

     vendor/bin/phpcs -i
    
  5. Done!

     vendor/bin/phpcs /path/to/code
    

### Stand-alone

  1. Install PHP_CodeSniffer

  2. Checkout this repository

     git clone git://github.com/A5sys/A5sys-coding-standard.git
    
  3. Add the coding standard to the PHP_CodeSniffer install path

     phpcs --config-set installed_paths /path/to/A5sys-coding-standards
    

    Or copy/symlink this repository's "A5sys"-folder inside the phpcs Standards directory

  4. Check the installed coding standards for "A5sys"

     phpcs -i
    
  5. Done!

     phpcs /path/to/code