xuanquynh/php-codesniffer

This package is abandoned and no longer maintained. The author suggests using the sepiphy/php-codesniffer package instead.

PHP CodeSniffer

v2.3.0 2019-08-17 01:30 UTC

README

Packagist Packagist Version GitHub

This package is abandoned. Use sepiphy/php-codesniffer instead.

PHP CodeSniffer

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