kazuto/php-cs-preset

PHP Coding Standards Fixer Preset

1.0.1 2021-10-23 08:54 UTC

This package is auto-updated.

Last update: 2024-10-23 15:17:59 UTC


README

composer required kazuto/php-cs-preset --dev

Usage

  • Create a configuration file touch .php-cs-fixer.dist.php
  • Add the following content to the file for the minimum setup
<?php

use Kazuto\PhpCsPreset\Preset;

$classLoader = require __DIR__ . '/vendor/autoload.php';
$classLoader->register(true);

// Override rules to your liking
$rules = [
];

$finder = PhpCsFixer\Finder::create()
    ->in([
        __DIR__ . '/path/to/your/source/code',
    ]);

return Preset::apply($finder, $rules);