Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are "MySource" and "Squiz" Coding Standards?

After installing Composer in windows 10, the result of phpc -i command is:

"The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz and Zend."

After lots of searches I was unable to find any documentation about MySource coding standard, nor for Squiz coding standard.

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? (currently I've set only PSR1,PSR12 in my VSCode code sniffer extension settings.)

like image 590
IT_man2018 Avatar asked Feb 21 '26 03:02

IT_man2018


2 Answers

Squiz Labs is (or was?) the group behind PHP CS. You can see that in the repo URL: https://github.com/squizlabs/PHP_CodeSniffer

From the ruleset definition:

The MySource coding standard builds on the Squiz coding standard. Currently used for MySource Mini development.

like image 127
Chris Haas Avatar answered Feb 22 '26 16:02

Chris Haas


The Squiz coding standard has a lot of useful sniffs in there, and they are used by some of the other included standards. The MySource standard is old and not useful, is deprecated, and already removed in the 4.0 branch.

like image 30
Greg Sherwood Avatar answered Feb 22 '26 16:02

Greg Sherwood