lcapps/php-code-style

LCApps 的 PHP 代码风格

1.0.7 2024-04-08 09:40 UTC

This package is auto-updated.

Last update: 2024-09-08 10:30:36 UTC


README

如何使用此仓库

  1. 安装依赖项: composer req --dev lcapps/php-code-style

  2. 在您的项目根目录中创建名为 ecs.php 的文件,并包含以下内容

    use LCApps\CodeStyle\CodeStyleSets;
    use Symplify\EasyCodingStandard\Config\ECSConfig;

    return function (ECSConfig $ecsConfig): void {
        // Configure your paths
        $ecsConfig->paths([
            __DIR__ . '/config',
            __DIR__ . '/public',
            __DIR__ . '/src',
            __DIR__ . '/tests',
        ]);

        // If you want to use Symfony rules, uncomment the following line
        //$ecsConfig->dynamicSets(['@Symfony']);
        
        $ecsConfig->sets([CodeStyleSets::DEFAULT]);
        
    };