简体   繁体   English

什么是“MySource”和“Squiz”编码标准?

[英]What are "MySource" and "Squiz" Coding Standards?

After installing Composer in windows 10, the result of phpc -i command is:在 windows 10 中安装 Composer 后, phpc -i命令的结果是:

"The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz and Zend." “安装的编码标准是 MySource、PEAR、PSR1、PSR12、PSR2、Squiz 和 Zend。”

After lots of searches I was unable to find any documentation about MySource coding standard, nor for Squiz coding standard.经过大量搜索后,我找不到任何有关MySource编码标准和Squiz编码标准的文档。

So what are these two standards?那么这两个标准是什么? Are there any link to their documentation to see what sniffs they do?是否有任何指向他们的文档的链接以查看他们所做的嗅探?

In fact I need to know are there any extra sniffs which these two standard do in comparison with PSR12?事实上,我需要知道这两个标准与 PSR12 相比是否有任何额外的嗅探? (currently I've set only PSR1,PSR12 in my vscode code sniffer extension settings.) (目前我在我的 vscode 代码嗅探器扩展设置中只设置了PSR1、PSR12 。)

Squiz Labs is (or was?) the group behind PHP CS. Squiz Labs 是(或曾经是?)PHP CS 背后的团队。 You can see that in the repo URL: https://github.com/squizlabs/PHP_CodeSniffer您可以在回购 URL 中看到: https://github.com/squizlabs/PHP_CodeSniffer

From the ruleset definition :规则集定义

The MySource coding standard builds on the Squiz coding standard. MySource 编码标准建立在 Squiz 编码标准之上。 Currently used for MySource Mini development.目前用于 MySource Mini 开发。

The Squiz coding standard has a lot of useful sniffs in there, and they are used by some of the other included standards. Squiz 编码标准中有很多有用的嗅探,它们被其他一些包含的标准使用。 The MySource standard is old and not useful, is deprecated, and already removed in the 4.0 branch. MySource 标准陈旧且无用,已弃用,并已在 4.0 分支中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM