instapro/coding-standard

Instapro 编码标准

1.2.0 2024-01-04 14:01 UTC

This package is not auto-updated.

Last update: 2024-09-12 17:06:04 UTC


README

Instapro 编码标准是我们用于 Instapro 项目的 PHP CS Fixer 规则集。

如何使用

  1. 将包作为开发依赖项安装

    composer require --dev instapro/coding-standard
  2. 添加/更新您的 .php-cs-fixer.dist.php 配置文件以从包中加载配置。请确保更新查找器配置以匹配您想要强制执行编码标准的文件。

    <?php
    
    declare(strict_types=1);
    
    use Instapro\CodingStandard\Load;
    
    return Load::configuration(
        PhpCsFixer\Finder::create()
            ->exclude('Files')
            ->in([
                __DIR__ . '/src',
                __DIR__ . '/tests',
            ])
            ->name('*.php'),
    );