执行代码修复和审查

dev-master 2017-05-12 08:51 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:53:07 UTC


README

Packagist Software License Build Status Coverage Status Quality Score Total Downloads

执行代码修复和审查

工具列表

安装

通过 Composer

composer require funivan/cs:dev-master

使用方法

  # run review tool
  ./vendor/bin/cs.php review;

  # run fixer tool
  ./vendor/bin/cs.php fix;

自定义配置

创建自定义配置文件。例如 cs-fix.php

<?php
  # file cs-fix.php
  require __DIR__ . '/vendor/autoload.php';


  use Funivan\Cs\Configuration\CsConfiguration;

  $configuration = CsConfiguration::createFixerConfiguration();
  // You can set custom file finder
  // $configuration->setFileFinder(new MyProjectCustomFileFinder());

  // You can add custom tools
  // $configuration->setTool(new MyProjectCustomCheckTool());

然后运行修复器

  ./vendor/bin/cs.php fix --configuration=cs-fixer.php -vvv

测试

    ./vendor/bin/phpunit

贡献

请参阅 CONTRIBUTING 了解详细信息。

鸣谢

许可协议

MIT 许可协议 (MIT)。有关更多信息,请参阅 许可文件