承接 dodger451/laravelcodechecker 相关项目开发

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

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

dodger451/laravelcodechecker

Composer 安装命令:

composer require dodger451/laravelcodechecker

包简介

Basic configurable phpmd, phpcs and lint setup with artisan support

README 文档

README

[StyleCI]

Creates laravel artisan commands to validate your application's sourcecode with php -l, phpmd and phpcs.

Publishes predefined style rulesets into config/ for customization.

Installation

Install via Composer

$ composer require --dev dodger451/laravelcodechecker

Then copy the default config files to /config by running

php artisan vendor:publish --tag=laravelcodechecker

This will create some rulesets for phpmd and phpcs in config/

config/
    laravelcodechecker.php
    phpcs/
        ruleset.xml
    phpmd/
        rulesets/
            cleancode.xml
            codesize.xml
            controversial.xml
            design.xml
            naming.xml
            unusedcode.xml

Adopt the rules in phpcs/ruleset.xml and phpmd/rulesets/*.xml to your preferences, the cc: commands will use them per default. To change the default rulefiles, modify config/laravelcodechecker.php

Usage

To validate the application with all checks, run

php artisan cc:all

This will run php -l, phpmd and phpcs on all .php files in tests/ routes/ config/ and app/.

Alternatively, run each separately:

php artisan cc:phplint
php artisan cc:phpcs
php artisan cc:phpmd

Per default, each command will target tests routes config app. You can provide dirs and/or files as arguments to each cc: command, if you don't want to use the default targets in config/laravelcodechecker.php

E.g. to limit phpmd to the directories tests/ and app/ run

php artisan cc:phpmd tests app

To change the default targets per command, modify laravelcodechecker.php

Travis

Example .travis.yml for travis-ci.org

language: php
php:
  - '7.1'
  - '7.2'
  - nightly

install:
  - composer install

script:
  - php artisan cc:all

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

[link-styleci]: https://styleci.io/repos/154905196)] [link-author]: https://github.com/dodger451

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固