tpay-com/coding-standards

Tpay.com 编码规范库

1.0.1 2023-08-22 10:49 UTC

This package is auto-updated.

Last update: 2024-09-22 13:15:25 UTC


README

Latest stable version PHP version License CI status Type coverage

安装

运行命令

composer require --dev tpay-com/coding-standards

用法

创建 .php-cs-fixer.php 文件并使用 Tpay\CodingStandards\PhpCsFixerConfigFactory

<?php

require __DIR__ . '/vendor/tpay-com/coding-standards/bootstrap.php';

return Tpay\CodingStandards\PhpCsFixerConfigFactory::createWithAllRules()
    ->setFinder(
        PhpCsFixer\Finder::create()
            ->ignoreDotFiles(false)
            ->in(__DIR__)
    );

您可以使用方法 createWithNonRiskyRules 来仅使用非风险修复器,而不是使用 createWithAllRules

使用方法 createWithLegacyRules 来仅使用对 PHP 5.6 及以下版本安全的修复器集合。