Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mnapoli/hard-mode

PHP hard mode
https://github.com/mnapoli/hard-mode

coding-standard coding-style php

Last synced: 25 days ago
JSON representation

PHP hard mode

Awesome Lists containing this project

README

        

## Usage

```
composer require --dev mnapoli/hard-mode
```

Then write a `.phpcs.xml.dist` file:

```xml

src
tests

```

Then run the analysis:

```
vendor/bin/phpcs
```

Or using [pretty](https://github.com/mnapoli/pretty):

```
vendor/bin/pretty
```

## Fixing errors

Run:

```
vendor/bin/phpcbf
```

Or using [pretty](https://github.com/mnapoli/pretty):

```
vendor/bin/pretty fix
```

## Advanced configuration

Check out the [PHP CodeSniffer documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki) for all the options. You will find below documentation for common scenarios.

To exclude some files from the analysis:

```xml
tests/Fixtures
```

On large projects you may want to use PHP CodeSniffer's cache:

```xml

```

Remember to add `.phpcs-cache` to `.gitignore`.