cpsit/php-cs-fixer-config

CPS 项目共享的 PHP-CS-Fixer 配置

1.1.0 2023-12-29 10:59 UTC

This package is auto-updated.

Last update: 2024-09-20 16:21:48 UTC


README

PHP-CS-Fixer 配置

Coverage Maintainability CGL Tests Supported PHP Versions

此包包含基本的 PHP-CS-Fixer 配置,用于CPS项目。所有配置选项都作为规则集提供,针对不同的使用场景。

🔥 安装

Packagist Packagist Downloads

composer require --dev cpsit/php-cs-fixer-config

⚡ 使用

在您的 .php-cs-fixer.php 文件中配置 PHP-CS-Fixer

use CPSIT\PhpCsFixerConfig;
use PhpCsFixer\Config;

// Create config object and configure Finder
$config = new Config();
$config->getFinder()->in(__DIR__);

// Apply ruleset
$ruleset = new PhpCsFixerConfig\Rule\DefaultRuleset();
$ruleset->apply($config);

return $config;

🧑‍💻 贡献

请参阅 CONTRIBUTING.md

⭐ 许可证

本项目采用 GNU 通用公共许可证 3.0(或更高版本) 许可。