定制 mxrvx/code-style 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mxrvx/code-style

最新稳定版本:v1.0.1

Composer 安装命令:

composer require mxrvx/code-style

包简介

Code style and static analysis tools rulesets collection

README 文档

README

This repository contains ruleset for PHP CS Fixer based on PER-2.

Installation and configuration

Install the package via composer:

composer require --dev mxrvx/code-style

PHP Latest Version on Packagist License Total Downloads

Create a configuration file .php-cs-fixer.dist.php in the root of your project:

<?php

declare(strict_types=1);

require_once 'vendor/autoload.php';

return \MXRVX\CodeStyle\Builder::create()
    ->include(__DIR__ . '/src')
    ->include(__FILE__)
    ->build();

Feel free to adjust the paths to include/exclude files and directories.

Usage

To more convenient usage, you can add the following commands to the scripts section of the composer.json file:

{
    "scripts": {
        "cs:diff": "php-cs-fixer fix --dry-run -v --diff",
        "cs:fix": "php-cs-fixer fix -v"
    }
}

Now you can run the following commands:

composer cs:diff
composer cs:fix

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-10