Skip to content

Shared PHP-CS-Fixer configuration for CPS projects

License

Notifications You must be signed in to change notification settings

CPS-IT/php-cs-fixer-config

Repository files navigation

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