承接 esfahanahan/php-cs-fixer-config 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

esfahanahan/php-cs-fixer-config

最新稳定版本:v1.0.0

Composer 安装命令:

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

包简介

Prebuilt PHP CS Fixer configuration for EsfahanAhan projects

README 文档

README


EsfahanAhan

EsfahanAhan PHP-CS-Fixer configuration

The default PHP-CS-Fixer configuration for EsfahanAhan projects.

ci pull requests contributors

Built with ❤️︎ and 🍵 by heroes at EsfahanAhan.

Installation

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

Usage

Basic usage

.php-cs-fixer.php

<?php

require 'vendor/autoload.php';

return EsfahanAhan\PhpCsFixer\Config::fromFolders(['src']);

To exclude a subfolder:

<?php

require 'vendor/autoload.php';

return EsfahanAhan\PhpCsFixer\Config::fromFolders(['src'], null, ['ignoreThisDir']);

This will skip src/ignoreThisDir or src/foo/bar/ignoreThisDir. (The folder has to be relative to the ones in the first argument.)

You can also override rules per-project without overriding the core rules like this:

.php-cs-fixer.php

<?php

require 'vendor/autoload.php';

return EsfahanAhan\PhpCsFixer\Config::fromFolders(['src'])->mergeRules([
   'php_unit_strict' => false,
]);

Usage within a Laravel project

You can also preconfigure the configuration for a Laravel project by calling a special factory method:

.php-cs-fixer.php

<?php

require 'vendor/autoload.php';

return EsfahanAhan\PhpCsFixer\Config::forLaravel();

If need be, you can also append folders to fix in addition to Laravel's:

.php-cs-fixer.php

<?php

require 'vendor/autoload.php';

return EsfahanAhan\PhpCsFixer\Config::forLaravel(['some_other_folder']);

Targeting a specific PHP version

By default, the configuration will check the version of PHP you run the tool with, and proceed to enable/disable fixers depending on it.

You can override the target PHP version by passing it either as constructor argument, or as second argument to fromFolders:

.php-cs-fixer.php

<?php

require 'vendor/autoload.php';

return EsfahanAhan\PhpCsFixer\Config::fromFolders(['src'], '8.3');

// or

return EsfahanAhan\PhpCsFixer\Config::forLaravel([], '8.3');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固