Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mnapoli/hard-mode
- Owner: mnapoli
- License: mit
- Created: 2019-02-20T21:38:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-12T07:56:19.000Z (about 4 years ago)
- Last Synced: 2024-10-03T11:17:19.394Z (about 1 month ago)
- Topics: coding-standard, coding-style, php
- Homepage:
- Size: 7.81 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`.