2017 © Pedro Peláez
 

library php7_codesniffer

PHP7_CodeSniffer detects and fixes violations against your coding standard.

image

symplify/php7_codesniffer

PHP7_CodeSniffer detects and fixes violations against your coding standard.

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

CodeSniffer in PHP 7, with simple usage everyone understands

This is essential development tool that ensures your code remains clean and consistent., (*1)

Build Status Quality Score Code Coverage Downloads total Latest stable, (*2)

Install

composer require symplify/php7_codesniffer --dev

Use

Run it from cli:, (*3)

vendor/bin/php7cs src --standards=PSR2

To fix the issues just add --fix:, (*4)

vendor/bin/php7cs src --standards=PSR2 --fix

How to Use Specific Sniff Only?

vendor/bin/php7cs src --sniffs=PSR2.Classes.ClassDeclaration
vendor/bin/php7cs src --sniffs=PSR2.Classes.ClassDeclaration,Zend.Files.ClosingTag

You can combine them as well:, (*5)

vendor/bin/php7cs src --standards=PSR2 --sniffs=Zend.Files.ClosingTag

Or Use Standard WITHOUT One Sniff?

vendor/bin/php7cs src --standards=PSR2 --exclude-sniffs=PSR2.Namespaces.UseDeclaration

Testing

bin/php7cs src tests --standards=PSR2
vendor/bin/phpunit

Contributing

Rules are simple:, (*6)

  • new feature needs tests
  • all tests must pass
  • 1 feature per PR

I'd be happy to merge your feature then., (*7)

The Versions

05/09 2016
05/09 2016
23/08 2016
22/08 2016
22/08 2016
20/08 2016
19/08 2016
28/07 2016

v0.1.0

0.1.0.0

PHP7_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Greg Sherwood

phpcs php7 standards code sniffer symplify