cpsit/php-cs-fixer-config

Shared PHP-CS-Fixer configuration for CPS projects

1.2.0 2024-11-07 07:08 UTC

This package is auto-updated.

Last update: 2024-12-19 10:45:34 UTC


README

PHP-CS-Fixer config

Coverage Maintainability CGL Tests Supported PHP Versions

This package contains basic PHP-CS-Fixer configuration for use in CPS projects. All configuration options are shipped as rulesets targeting different use cases.

🔥 Installation

Packagist Packagist Downloads

composer require --dev cpsit/php-cs-fixer-config

⚡ Usage

Configure PHP-CS-Fixer in your .php-cs-fixer.php file:

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.

⭐ License

This project is licensed under GNU General Public License 3.0 (or later).