https://github.com/cps-it/php-cs-fixer-config
Shared PHP-CS-Fixer configuration for CPS projects
https://github.com/cps-it/php-cs-fixer-config
config php-cs-fixer ruleset
Last synced: 8 months ago
JSON representation
Shared PHP-CS-Fixer configuration for CPS projects
- Host: GitHub
- URL: https://github.com/cps-it/php-cs-fixer-config
- Owner: CPS-IT
- License: gpl-3.0
- Created: 2023-12-29T07:55:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T05:17:44.000Z (over 1 year ago)
- Last Synced: 2025-01-06T06:34:21.360Z (over 1 year ago)
- Topics: config, php-cs-fixer, ruleset
- Language: PHP
- Homepage:
- Size: 258 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP-CS-Fixer config
[](https://coveralls.io/github/CPS-IT/php-cs-fixer-config)
[](https://codeclimate.com/github/CPS-IT/php-cs-fixer-config/maintainability)
[](https://github.com/CPS-IT/php-cs-fixer-config/actions/workflows/cgl.yaml)
[](https://github.com/CPS-IT/php-cs-fixer-config/actions/workflows/tests.yaml)
[](https://packagist.org/packages/cpsit/php-cs-fixer-config)
This package contains basic [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
configuration for use in CPS projects. All configuration options are shipped as rulesets
targeting different use cases.
## 🔥 Installation
[](https://packagist.org/packages/cpsit/php-cs-fixer-config)
[](https://packagist.org/packages/cpsit/php-cs-fixer-config)
```bash
composer require --dev cpsit/php-cs-fixer-config
```
## ⚡ Usage
Configure PHP-CS-Fixer in your `.php-cs-fixer.php` file:
```php
use CPSIT\PhpCsFixerConfig;
use PhpCsFixer\Config;
// Create config object and configure Finder
$config = new Config();
$config->getFinder()->in(__DIR__);
// Apply ruleset
$ruleset = new PhpCsFixerConfig\Rule\DefaultRuleset();
$ruleset->apply($config);
return $config;
```
## 🧑💻 Contributing
Please have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md).
## ⭐ License
This project is licensed under [GNU General Public License 3.0 (or later)](LICENSE).