This repository contains the PHP coding style definitions in form of a php-cs-fixer configuration.
To use Enginiro’s coding style in your project, first require this library, and
then change the Config
class to the one provided by this project.
composer.json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/enginiro/php-cs-fixer-config"
}
]
}
$ composer require --dev enginiro/php-cs-fixer-config:dev-main@dev
.php-cs-fixer.dist.php
<?php
declare(strict_types=1);
include_once __DIR__.'/vendor/autoload.php';
$finder = PhpCsFixer\Finder::create();
$finder
->in(__DIR__.'/src')
->in(__DIR__.'/tests');
$config = new Enginiro\PhpCsFixerConfig\Config();
$config->setFinder($finder);
return $config;