inviqa/magento1-coding-standard 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

inviqa/magento1-coding-standard

Composer 安装命令:

composer require inviqa/magento1-coding-standard

包简介

A set of PHP_CodeSniffer rules and sniffs for Magento1

README 文档

README

Magento1 coding standard which consumes Magento EQP1 and Magento ECG with extra Sniffs and configuration.

Installation & Usage

composer config repositories.inviqa-magento1cs vcs https://github.com/inviqa/magento-phpcs-coding-standard
composer require inviqa/magento1-coding-standard --update-with-dependencies --dev

Composer Scripts

Utility configuration to wrapping phpcs arguments, require the package using Composer's CLI.

composer.phar require inviqa/magento-phpcs-coding-standard --dev --update-with-dependencies

Update your project's composer.json with the following root options

{
    "config": {
        "bin-dir": "bin"
    },
    "scripts": {
        "sniff": "bin/phpcs -ns --standard=vendor/inviqa/magento-phpcs-coding-standard"
    }
}

Run Composer script

composer.phar sniff Magento/app/code/local/Acme/ExampleModule/{Block,Helper,Model}

Config file

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="AcmeCompany">
    <description>AcmeCompany - PHP CodeSniffer configuration</description>

    <rule ref="vendor/inviqa/magento1-coding-standard"/>

    <exclude-pattern>*/code/community/*</exclude-pattern>
    <exclude-pattern>*/code/core/*</exclude-pattern>
    <exclude-pattern>*/tests/*</exclude-pattern>
    <exclude-pattern>*/data/*</exclude-pattern>
    <exclude-pattern>*/sql/*</exclude-pattern>
</ruleset>

Existing projects can require the Inviqa Magento1 coding standard by updating the phpcs.xml file like above.

Requirements

PHP >= 5.6

Development

A docker environment has been provided to update the composer dependencies - should composer / PHP not be available globally on the host development machine.

docker-compose up -d
docker-compose rn --rm composer bash
composer update | require acme/package

Commit the updated composer.json for peer review.

Contribution

Please feel free to contribute new sniffs or any fixes or improvements for the existing ones.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 16
  • Forks: 95
  • 开发语言: PHP

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固