Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rem42/php-cs-fixer-config
https://github.com/rem42/php-cs-fixer-config
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rem42/php-cs-fixer-config
- Owner: rem42
- License: mit
- Created: 2020-03-22T15:04:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-09T22:05:26.000Z (30 days ago)
- Last Synced: 2024-12-09T23:18:58.759Z (30 days ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# php-cs-fixer-config
[`PHP CS Fixer`](http://github.com/FriendsOfPHP/PHP-CS-Fixer) config for M6Web components.
## Installation
Run
```
$ composer require --dev rem42/php-cs-fixer-config
```## Usage
### Configuration
Create a configuration file `.php-cs-fixer.dist.php` in the root of your project:
```php
getFinder()
->in(
[
__DIR__.'/src',
__DIR__.'/tests',
]
);return $config;
```### Git
Add `.php-cs-fixer.cache` (this is the cache file created by `php-cs-fixer`) to `.gitignore`:
```
vendor/
.php-cs-fixer.cache
```### Makefile
Create a `Makefile` with the targets below:
```Makefile
# Coding Stylecs:
./bin/php-cs-fixer fix --dry-run --stop-on-violation --diffcs-fix:
./bin/php-cs-fixer fixcs-ci:
./bin/php-cs-fixer fix --dry-run --using-cache=no --verbose
```## Fixing issues
### Manually
If you need to **check** issues locally, just run
```
$ make cs
```If you need to **fix** issues locally, just run
```
$ make cs-fix
```In your Continuous Integration, run
```
$ make cs-ci
```## Credits
Developed by [Rémy BRUYERE (rem42)](https://remy.ovh), inspired by [Bedrock Streaming](https://tech.bedrockstreaming.com).
## License
This project is licensed under the [MIT license](LICENSE).