Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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