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 1
1
# Introduction
2
2
3
3
This 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
5
5
a workable and fast standard.
6
6
7
7
# Installation
Original file line number Diff line number Diff line change 11
11
}
12
12
],
13
13
"require" : {
14
+ "magento/magento-coding-standard" : " *" ,
14
15
"youwe/coding-standard" : " >=3.3.0"
15
16
},
16
17
"autoload" : {
17
18
"psr-0" : {
18
19
"YouweMagento2" : " src/YouweMagento2"
19
20
}
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
+ ]
20
32
}
21
33
}
Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
<ruleset name =" YouweMagento2" >
9
- <description >Youwe coding standards for Magento2.</description >
9
+ <description >Youwe coding standards for Magento2 websites and modules</description >
10
+
10
11
<arg name =" colors" />
11
12
<arg name =" extensions" value =" php/PHP,phtml/PHP,js/JS,css/CSS" />
12
13
13
14
<!-- 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" >
17
16
<exclude name =" GlobalCommon.Php7.ReturnType" />
18
- <exclude name =" Squiz.Commenting.FunctionComment.TypeHintMissing" />
19
17
<exclude name =" PSR2.Methods.MethodDeclaration.Underscore" />
18
+ <exclude name =" Squiz.Classes.ValidClassName.NotCamelCaps" />
20
19
<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" />
21
28
</rule >
22
29
23
30
<rule ref =" Generic.Files.LineLength.TooLong" >
24
- <exclude-pattern >*.phtml</exclude-pattern >
31
+ <exclude-pattern >*.phtml,*.xml </exclude-pattern >
25
32
</rule >
26
33
27
34
<rule ref =" Squiz.ControlStructures.ControlSignature" >
You can’t perform that action at this time.
0 commit comments