jakubciszak/mg-codestandards
Composer 安装命令:
composer require jakubciszak/mg-codestandards
包简介
Code styles for Magento
README 文档
README
This rule based on Magento Extension Quality Program Coding Standard
Installation
Composer create:
$ composer create-project jakubciszak/mg-codestandards
The scripts to set installed_paths should be running and write the info:
Config value "installed_paths" added successfully
Basic usage
Select a standard to run with CodeSniffer:
Run CodeSniffer: Go to project directory:
$ cd mg-codestandards
$ vendor/bin/phpcs </path/to/moduleOrFile> --standard=MG1
Setting up PHPSTORM
File | Settings | Languages & Frameworks | PHP | Quality Tools
Code sniffer -> ... near Configuration.
Set "PHP Code Sniffer Path" to:
/<YOURPATH>/mg-codestandards/vendor/bin/phpcs
Next go to
File | Settings | Editor | Inspections
Find PHP Code Sniffer Validation and select Condig Standard to MG1
Company standards
You can create your own company standards based on mg-codestandards.
To do this, create a special_paths.cfg file in project root directory, and add line with absolute path to your standards directory.
Eg. /home/user/rules.
Next, run the bin/setup script.
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-03-08