-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
25 lines (20 loc) · 865 Bytes
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>PHPCS configuration file.</description>
<file>app</file>
<file>tests</file>
<exclude-pattern>./vendor/*</exclude-pattern>
<rule ref="PSR12">
<!-- 讓 use trait 不用一行一個 -->
<exclude name="PSR12.Traits.UseDeclaration"/>
<!-- 移除字數限制 (有時很難符合) -->
<exclude name="Generic.Files.LineLength"/>
</rule>
<rule ref="Generic.CodeAnalysis.AssignmentInCondition"/>
<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/>
<rule ref="Squiz.NamingConventions.ValidVariableName.StringNotCamelCaps"/>
<!-- 讓 test function 可以用 test_api_found_404 的樣式 -->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>