定制 rebuy/php-cs 二次开发

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

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

rebuy/php-cs

Composer 安装命令:

composer require rebuy/php-cs

包简介

PHP Coding style configuration for reBuy projects

README 文档

README

The file .php_cs.dist contains all rules which apply to the coding standards for rebuy. You can find the description of these rules in the PHP-CS-Fixer repository.

Examples

Travis code style check

vendor/bin/php-cs-fixer fix --config=vendor/rebuy/php-cs/.php_cs.dist -v --dry-run --using-cache=no `git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE`

Note: If you define the path in your own .php_cs.dist file, you might want use --path-mode intersection.

Fixing code styles

vendor/bin/php-cs-fixer fix --config=vendor/rebuy/php-cs/.php_cs.dist yourDirectory/`

Fixing code styles from $yourBranch to master

vendor/bin/php-cs-fixer fix --config=.php_cs.dist `git diff --name-only --diff-filter=ACMRTUXB master`

Overwriting rules

There might be some scenarios where you have to adjust the rules defined here, in this case you can include the base file and extend it to your needs:

<?php

$config = include 'vendor/rebuy/php-cs/.php_cs.dist';

$currentRules = $config->getRules();
$newRules = [
    'phpdoc_no_empty_return' => false,
];

$config->setRules(array_merge($currentRules, $newRules));

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固