Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glensc/php-cs-fixer-config
Configuration builder for php-cs-fixer
https://github.com/glensc/php-cs-fixer-config
Last synced: 3 months ago
JSON representation
Configuration builder for php-cs-fixer
- Host: GitHub
- URL: https://github.com/glensc/php-cs-fixer-config
- Owner: glensc
- License: mit
- Created: 2019-11-04T11:31:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-29T12:41:54.000Z (over 1 year ago)
- Last Synced: 2024-10-07T05:48:13.040Z (3 months ago)
- Language: PHP
- Size: 71.3 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-cs-fixer-config
Provides default configuration and configuration builder for [friendsofphp/php-cs-fixer].
Does the following things:
- [Filter\GitFilter](src/Filter/GitFilter.php): Configures to accept only files that are present in Git
- [Filter\DefaultFilter](src/Filter/DefaultFilter.php): Configures to include `.php_cs` to file set
- [Rules\DefaultRules](src/Rules/DefaultRules.php): Applies set of rules based on @Symfony rules
- [Rules\PlatformRules](src/Rules/PlatformRules.php): Enables extra rules that are dependent on PHP versionThe PHP version determined by:
- read from `composer.lock` (if file present):
```json
"platform-overrides": {
"php": "5.6.0"
}
```
- read from `composer.json:`
```json
"config": {
"platform": {
"php": "5.6.0"
}
}
```[friendsofphp/php-cs-fixer]: http://github.com/FriendsOfPHP/PHP-CS-Fixer
## Installation
Run
```sh
$ composer require --dev glen/php-cs-fixer-config
```## Usage
### Configuration
Create a configuration file `.php_cs` in the root of your project:
```php
getRuleBuilder();
$rules['indentation_type'] = false;
$rules['class_definition'] = false;return $config;
```## License
This package is licensed using the MIT License.
## Credits
This project README is inspired by [localheinz/php-cs-fixer-config].
[localheinz/php-cs-fixer-config]: https://github.com/localheinz/php-cs-fixer-config