File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 11# Introduction
22
33This is the Youwe coding standard for Magento 2 projects. It is based on
4- the default Youwe coding standard but some tests have been removed to create
4+ the default Magento2 coding standard but some tests have been removed to create
55a workable and fast standard.
66
77# Installation
Original file line number Diff line number Diff line change 1111 }
1212 ],
1313 "require" : {
14+ "magento/magento-coding-standard" : " *" ,
1415 "youwe/coding-standard" : " >=3.3.0"
1516 },
1617 "autoload" : {
1718 "psr-0" : {
1819 "YouweMagento2" : " src/YouweMagento2"
1920 }
21+ },
22+ "scripts" : {
23+ "post-install-cmd" : [
24+ " @phpcs-set-paths"
25+ ],
26+ "post-update-cmd" : [
27+ " @phpcs-set-paths"
28+ ],
29+ "phpcs-set-paths" : [
30+ " vendor/bin/phpcs --config-set installed_paths src/,../../magento/magento-coding-standard/,../../phpcompatibility/php-compatibility/"
31+ ]
2032 }
2133}
Original file line number Diff line number Diff line change 66 */
77-->
88<ruleset name =" YouweMagento2" >
9- <description >Youwe coding standards for Magento2.</description >
9+ <description >Youwe coding standards for Magento2 websites and modules</description >
10+
1011 <arg name =" colors" />
1112 <arg name =" extensions" value =" php/PHP,phtml/PHP,js/JS,css/CSS" />
1213
1314 <!-- Base rules on Youwe -->
14- <rule ref =" ../../../coding-standard/src/GlobalCommon" >
15- <exclude name =" Squiz.Classes.ValidClassName.NotCamelCaps" />
16- <exclude name =" Squiz.Commenting.FunctionComment.ScalarTypeHintMissing" />
15+ <rule ref =" Youwe" >
1716 <exclude name =" GlobalCommon.Php7.ReturnType" />
18- <exclude name =" Squiz.Commenting.FunctionComment.TypeHintMissing" />
1917 <exclude name =" PSR2.Methods.MethodDeclaration.Underscore" />
18+ <exclude name =" Squiz.Classes.ValidClassName.NotCamelCaps" />
2019 <exclude name =" Squiz.Commenting.FunctionComment.EmptyThrows" />
20+ <exclude name =" Squiz.Commenting.FunctionComment.ScalarTypeHintMissing" />
21+ <exclude name =" Squiz.Commenting.FunctionComment.TypeHintMissing" />
22+ </rule >
23+
24+ <!-- Import most rules from official Magento2 coding standard -->
25+ <rule ref =" Magento2" >
26+ <exclude name =" Magento2.Annotation" />
27+ <exclude name =" Magento2.Commenting.ClassPropertyPHPDocFormatting" />
2128 </rule >
2229
2330 <rule ref =" Generic.Files.LineLength.TooLong" >
24- <exclude-pattern >*.phtml</exclude-pattern >
31+ <exclude-pattern >*.phtml,*.xml </exclude-pattern >
2532 </rule >
2633
2734 <rule ref =" Squiz.ControlStructures.ControlSignature" >
You can’t perform that action at this time.
0 commit comments