xuanquynh/php-codesniffer

CodeSniffer for XuanQuynh Coding Recommendations.


README

CircleCI (all branches) Packagist Packagist Version GitHub

CodeSniffer for XuanQuynh Coding Recommendations

Requirements

  • PHP ^7.1.3

Installation

Install xuanquynh/php-codesniffer package via composer.

$ composer require xuanquynh/php-codesniffer --dev

Check what standards are available after installing.

$ vendor/bin/xphpcs -i
$ The installed coding standards are PEAR, Squiz, MySource, PSR1, Zend, PSR12, PSR2, Symfony, SunAsterisk, Laravel and XuanQuynh

Usage

Check PHP coding conventions of the given directory.

$ vendor/bin/xphpcs /path/to/source --standard=XuanQuynh

Fix PHP coding conventions of the given directory.

$ vendor/bin/xphpcbf /path/to/source --standard=XuanQuynh