cryonighter/cryonighter-coding-standard

CodeSniffer ruleset for the cryonighter coding standard

1.0.2 2019-08-27 12:14 UTC

This package is not auto-updated.

Last update: 2024-11-13 21:27:38 UTC


README

A coding standard to check against the cryonighter coding standards, originally shamelessly copied from the -disappeared- opensky/Symfony2-coding-standard repository.

Installation via Composer

This standard can be installed with the Composer dependency manager.

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

    composer global require cryonighter/cryonighter-coding-standard
    
  2. Add the coding standard to the PHP_CodeSniffer install path

    phpcs --config-set installed_paths ../../../vendor/escapestudios/symfony2-coding-standard,../../../vendor/cryonighter/cryonighter-coding-standard
    
  3. Check the installed coding standards for "Symfony" and "Cryonighter"

    phpcs -i
    

Installation Stand-alone

  1. Install PHP_CodeSniffer

  2. Checkout this repositories

    git clone git://github.com/djoos/Symfony2-coding-standard.git symfony2-coding-standard && git clone git@github.com:cryonighter/cryonighter-coding-standard.git
    
  3. Add the coding standard to the PHP_CodeSniffer install path

    phpcs --config-set installed_paths /path/to/symfony2-coding-standard,/path/to/cryonighter-coding-standard
    

    Or move/copy/symlink repositories Symfony and Cryonighter folders inside the phpcs Standards directory

  4. Check the installed coding standards for "Symfony" and "Cryonighter"

    phpcs -i
    

Usage

Via command line

phpcs --standard=Cryonighter --extensions=php --ignore=/path/to/exclude-code /path/to/code

PHP Code Sniffer Wiki: usage, advanced usage