Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hill-98/php-cs-fixer-config
Just a PHP CS Fixer rule set
https://github.com/hill-98/php-cs-fixer-config
Last synced: 10 days ago
JSON representation
Just a PHP CS Fixer rule set
- Host: GitHub
- URL: https://github.com/hill-98/php-cs-fixer-config
- Owner: Hill-98
- License: mit
- Created: 2021-06-27T18:37:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-07T09:15:29.000Z (over 3 years ago)
- Last Synced: 2024-07-09T11:08:40.487Z (7 months ago)
- Language: PHP
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Just a PHP CS Fixer rule set
Based on the [PSR12](https://cs.symfony.com/doc/ruleSets/PSR12.html) rule set to expand
## Install
`composer require hill-98/php-cs-fixer-config --dev`
You can also go to the [releases](https://github.com/Hill-98/php-cs-fixer-config/releases) of the latest version
## Usage
**`.php-cs-fixer.php`**:
```php
exclude('somedir')
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(__DIR__);// These rules will be merged and set ($rules must be array)
$rules = [];// Extended $config ($config must be \PhpCsFixer\ConfigInterface)
// $config = new PhpCsFixer\Config();/** @var \PhpCsFixer\Config $config */
$config = require __DIR__.'/vendor/hill-98/php-cs-fixer-config/main.php';// Auto set $finder ($finder must be iterable)
// $config->setFinder($finder); // Don't repeat SETreturn $config;
```