承接 drawmyattention/phpunit-code-quality 相关项目开发

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

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

drawmyattention/phpunit-code-quality

Composer 安装命令:

composer require drawmyattention/phpunit-code-quality

包简介

Automatically PHP check code quality once PHPUnit tests pass

README 文档

README

Automatically check code quality once your PHPUnit tests pass.

Installation

Installation is performed via Composer.

composer require --dev drawmyattention/phpunit-code-quality

Register a test listener to your phpunit.xml file:

<listeners>
    <listener class="DrawMyAttention\CodeQuality\Listeners\ComplexityAnalysisListener">
        <arguments>
            <object class="DrawMyAttention\CodeQuality\ComplexityAnalyser"/>
            <bool>true</bool>
        </arguments>
    </listener>
</listeners>

Configuring Project Settings

You can define which directories are scanned for code quality checking, as well as which directories and files are excluded. Sensible defaults are provided. By default, code stored in your src directory is checked, and any code in your tests directory is excluded.

You can create a complexity-analyser-config.php file in your project's root directory to specify alternative settings. See the provided config file, or copy and paste the following example:

return [

    // Directories which should be checked for code quality
    'scan_directories' => [
        'src',
    ],

    // Directories which should not be checked
    'excluded_directories' => [
        'app/Support',
        'tests',
    ],

    // Files which should not be checked
    'excluded_files' => [
        'app/Http/Controllers/SomeController.php',
    ],

];

Because this application utilises PHP Mess Detector to check code quality, you can define which rules should be applied when checking code quality. A full list of rules is available here.

Contributing

If you find a bug or would like to contribute to the development of this package, please submit a pull-request (with tests if possible).

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固