承接 jdolba/silverstripe-coding-standards 相关项目开发

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

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

jdolba/silverstripe-coding-standards

Composer 安装命令:

composer require jdolba/silverstripe-coding-standards

包简介

Coding standards and more for your SilverStripe project

README 文档

README

Set of definition and coding standards rules for your SilverStripe project

Install

Via Composer

composer require --dev jdolba/silverstripe-coding-standards ^0.1

Usage

Example of usage with composer scripts:

  • Add scripts to your composer.json file
    "scripts": {
        "silverstripe-standards": [
            "@php-lint",
            "@phpcs"
        ],
        "php-lint": "parallel-lint app/src app/tests",
        "phpcs": "phpcs app/src app/tests --standard=vendor/jdolba/silverstripe-coding-standards/definitions/php/phpcs-ss4.xml --extensions=php --encoding=utf-8",
        "phpcbf": "phpcbf app/src app/tests --standard=vendor/jdolba/silverstripe-coding-standards/definitions/php/phpcs-ss4.xml --extensions=php --encoding=utf-8",
        "phpcs-fix": "@phpcbf"
    },
  • then run:
composer silverstripe-standards
  • to fix your Standards violations you can run
composer phpcs-fix
# or
composer phpcbf

Custom rules

you can also customize rules by adding phpcs.xml file directly to you project root:

cp vendor/jdolba/silverstripe-coding-standards/skeletons/phpcs.xml phpcs.xml

don't forgot to change paths in composer scripts (--standard=phpcs.xml)

.editorconfig

you can use prepared .editorconfig file (see https://editorconfig.org/)

cp vendor/jdolba/silverstripe-coding-standards/skeletons/.editorconfig .editorconfig 

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固