wucdbm/php-cs-fixers

friendsofphp/php-cs-fixer 的修复器

v0.4.0 2021-02-12 00:14 UTC

This package is auto-updated.

Last update: 2024-09-12 08:05:59 UTC


README

在你的 .php_cs 文件中

<?php 

return PhpCsFixer\Config::create()
    ->registerCustomFixers([
        // Register the Custom Fixer
        new \Wucdbm\PhpCsFixer\Fixer\EnsureBlankLineAfterClassOpeningFixer()
    ])
    ->setRules([
        '@Symfony'                                     => true,
        // And add it to your list of rules
        'Wucdbm/ensure_blank_line_after_class_opening' => true
    ]);

带有版权的 wucdbm 自定义规则集 - 如此项目中的 .php_cs 文件所示

<?php

use Wucdbm\PhpCsFixer\Config\ConfigFactory;

$copyright = <<<COMMENT
This file is part of the Wucdbm PhpCSFixers package.

(c) Martin Kirilov <wucdbm@gmail.com>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
COMMENT;

return ConfigFactory::createCopyrightedConfig([
    __DIR__ . '/src',
    __DIR__ . '/tests'
], $copyright)
    ->setUsingCache(false);

无版权的 wucdbm 自定义规则集

<?php

use Wucdbm\PhpCsFixer\Config\ConfigFactory;

return ConfigFactory::createConfig(__DIR__ . '/src')
    ->setUsingCache(false);