/
phpcs.xml
34 lines (30 loc) · 1.16 KB
/
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
26
27
28
29
30
31
32
33
34
<?xml version="1.0"?>
<!-- 規則名稱 -->
<ruleset>
<!-- 以PSR12為基礎 -->
<rule ref="PSR12"/>
<!-- 不需要雙引號的字串,不得使用雙引號 -->
<rule ref="Squiz.Strings.DoubleQuoteUsage">
<type>warning</type>
</rule>
<!-- 允許雙引號字串中出現變數(上述規則會禁止這情況,因此須手動關閉) -->
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
<severity>0</severity>
</rule>
<!-- Config, Factory, Migration, Seeder 和 Routes 不需要 Namespace -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>config/*</exclude-pattern>
<exclude-pattern>database/factory/*</exclude-pattern>
<exclude-pattern>database/migrations/*</exclude-pattern>
<exclude-pattern>database/seeds/*</exclude-pattern>
<exclude-pattern>routes/*</exclude-pattern>
</rule>
<file>app</file>
<file>config</file>
<file>database</file>
<file>resources</file>
<file>routes</file>
<file>tests</file>
<exclude-pattern>*.blade.php</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>