cpsit/php-cs-fixer-config

Shared PHP-CS-Fixer configuration for CPS projects

1.1.0 2023-12-29 10:59 UTC

README

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).