madpilot78/php-cs-fixer-config 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

madpilot78/php-cs-fixer-config

最新稳定版本:1.2.0

Composer 安装命令:

composer require madpilot78/php-cs-fixer-config

包简介

Personal coding standards for the php cs fixer

README 文档

README

Madpilot78 coding standards for PHP CS Fixer.

Based on Nexcloud Coding Standard.

Installation

Add the package to your dev dependencies

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

and create a .php-cs-fixer.dist.php like

<?php

declare(strict_types=1);

require_once __DIR__ . '/vendor/autoload.php';

use madpilot78\PhpCsFixerConfig\Config;

$config = new Config();
$config
$config
    ->setRules([ // Added to default ones
        '@PHP82Migration' => true,
    ])
    ->getFinder()
    ->ignoreVCSIgnored(true)
    ->notPath('vendor')
    ->in(__DIR__);

return $config;

To run the fixer you first have to install it. Then you can run php-cs-fixer fix to apply all automated fixes.

For convenience you may add it to the scripts section of your composer.json:

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

Note: Don't forget to exclude .php-cs-fixer.dist.php and .php-cs-fixer.cache in your build scripts.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-28