Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deprecated-packages/php7_codesniffer
[DEPRECATED] Use:
https://github.com/deprecated-packages/php7_codesniffer
codesniffer coding-standard deprecated php-code-sniffer
Last synced: about 2 months ago
JSON representation
[DEPRECATED] Use:
- Host: GitHub
- URL: https://github.com/deprecated-packages/php7_codesniffer
- Owner: deprecated-packages
- License: mit
- Created: 2016-07-28T13:29:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-17T10:56:11.000Z (over 8 years ago)
- Last Synced: 2023-07-26T15:40:14.285Z (over 1 year ago)
- Topics: codesniffer, coding-standard, deprecated, php-code-sniffer
- Language: PHP
- Homepage: https://github.com/Symplify/EasyCodingStandard
- Size: 191 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeSniffer in PHP 7, with simple usage everyone understands
This is essential development tool that ensures your code **remains clean and consistent**.
[![Build Status](https://img.shields.io/travis/Symplify/PHP7_CodeSniffer.svg?style=flat-square)](https://travis-ci.org/Symplify/PHP7_CodeSniffer)
[![Quality Score](https://img.shields.io/scrutinizer/g/Symplify/PHP7_CodeSniffer.svg?style=flat-square)](https://scrutinizer-ci.com/g/Symplify/PHP7_CodeSniffer)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Symplify/PHP7_CodeSniffer.svg?style=flat-square)](https://scrutinizer-ci.com/g/Symplify/PHP7_CodeSniffer)
[![Downloads total](https://img.shields.io/packagist/dt/symplify/php7_codesniffer.svg?style=flat-square)](https://packagist.org/packages/symplify/php7_codesniffer)
[![Latest stable](https://img.shields.io/packagist/v/symplify/php7_codesniffer.svg?style=flat-square)](https://packagist.org/packages/symplify/php7_codesniffer)## Install
```bash
composer require symplify/php7_codesniffer --dev
```## Use
Run it from cli:
```bash
vendor/bin/php7cs src --standards=PSR2
```To fix the issues just add `--fix`:
```bash
vendor/bin/php7cs src --standards=PSR2 --fix
```### How to Use Specific Sniff Only?
```bash
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:
```bash
vendor/bin/php7cs src --standards=PSR2 --sniffs=Zend.Files.ClosingTag
```### Or Use Standard WITHOUT One Sniff?
```bash
vendor/bin/php7cs src --standards=PSR2 --exclude-sniffs=PSR2.Namespaces.UseDeclaration
```## Testing
```bash
bin/php7cs src tests --standards=PSR2
vendor/bin/phpunit
```## Contributing
Rules are simple:
- new feature needs tests
- all tests must pass
- 1 feature per PRI'd be happy to merge your feature then.