-
Notifications
You must be signed in to change notification settings - Fork 15
/
phpcs.xml.dist
29 lines (24 loc) · 1.1 KB
/
phpcs.xml.dist
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
<ruleset>
<file>.</file>
<rule ref="PSR2"/>
<!-- Use short array syntax ("[]" instead of "array()") -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- Ensure trailing comma in array definitions with multiple lines -->
<rule ref="Squiz.Arrays.ArrayDeclaration.NoComma"/>
<!-- Some useful generic PHP stuff -->
<rule ref="Generic.PHP.Syntax"/>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="print" value="echo"/>
<element key="print_r" value="null"/>
<element key="var_dump" value="null"/>
<element key="die" value="exit"/><!-- “Join us or die!” -->
<element key="dump" value="null"/><!-- Can be used by Symfony & Laravel -->
<element key="dd" value="null"/><!-- Can be used by Symfony >=4.1 & Laravel -->
</property>
</properties>
</rule>
<rule ref="Generic.PHP.RequireStrictTypes"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
</ruleset>