Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliangut/php-codesniffer-custom-sniffs
Custom sniffs for PHP_CodeSniffer
https://github.com/juliangut/php-codesniffer-custom-sniffs
Last synced: 23 days ago
JSON representation
Custom sniffs for PHP_CodeSniffer
- Host: GitHub
- URL: https://github.com/juliangut/php-codesniffer-custom-sniffs
- Owner: juliangut
- License: bsd-3-clause
- Created: 2022-09-22T20:55:48.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T20:20:10.000Z (8 months ago)
- Last Synced: 2024-08-09T15:01:14.546Z (3 months ago)
- Language: PHP
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![PHP version](https://img.shields.io/badge/PHP-%3E%3D7.4-8892BF.svg?style=flat-square)](http://php.net)
[![Latest Version](https://img.shields.io/packagist/v/juliangut/php-codesniffer-custom-sniffs.svg?style=flat-square)](https://packagist.org/packages/juliangut/php-codesniffer-custom-sniffs)
[![License](https://img.shields.io/github/license/juliangut/php-codesniffer-custom-sniffs.svg?style=flat-square)](https://github.com/juliangut/php-codesniffer-custom-sniffs/blob/master/LICENSE)[![Total Downloads](https://img.shields.io/packagist/dt/juliangut/php-codesniffer-custom-sniffs.svg?style=flat-square)](https://packagist.org/packages/juliangut/php-codesniffer-custom-sniffs/stats)
[![Monthly Downloads](https://img.shields.io/packagist/dm/juliangut/php-codesniffer-custom-sniffs.svg?style=flat-square)](https://packagist.org/packages/juliangut/php-codesniffer-custom-sniffs/stats)# php-codesniffer-custom-sniffs
Custom sniffs for [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/)
## Installation
### Composer
```
composer require --dev juliangut/php-codesniffer-custom-sniffs
```## Usage
It is recommended to also install [dealerdirect/phpcodesniffer-composer-installer](https://github.com/PHPCSStandards/composer-installer) to avoid needing to declare paths in your ruleset definition file
### Complete ruleset
```xml
```
### Only certain sniffs
```xml
```
## Sniffs
### CodeAnalysis
#### EmptyStatementSniff
There should not be empty statements
```diff
= 80_000) {
+ echo 'do something';
}
```##### Configuration
__catchIgnoreComment__ (string), catch statements may be allowed to be empty. Add a comment with the content of this variable, by default it's set to `@ignoreException`
```diff