-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml
More file actions
44 lines (37 loc) · 1.73 KB
/
Copy pathphpcs.xml
File metadata and controls
44 lines (37 loc) · 1.73 KB
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
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0"?>
<ruleset name="PHP-SDK">
<description>PSR-12 coding standard.</description>
<rule ref="PSR12">
<!-- prevent Class brace on new line -->
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/>
<!-- prevent function brace on new line -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
</rule>
<!-- Test the spacing of inline control statements -->
<rule ref="Squiz.ControlStructures.InlineIfDeclaration" />
<!-- Check to ensure no PHP deprecated functions have been used -->
<rule ref="Generic.PHP.DeprecatedFunctions">
<severity>5</severity>
<type>error</type>
</rule>
<!-- PHP opening tag must be full <?php, no shorthand or ASP tags -->
<rule ref="Generic.PHP.DisallowShortOpenTag">
<severity>5</severity>
<type>error</type>
</rule>
<!-- In PHP files make sure there is no character before the opening tag -->
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
<!-- Type casting should be immediately followed by the variable, no space -->
<rule ref="Generic.Formatting.NoSpaceAfterCast" />
<!-- Use CamelCase -->
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<!-- Exclude paths -->
<exclude-pattern>.ocmod/</exclude-pattern>
<exclude-pattern>.vendor/</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<exclude-pattern>upload/system/library/scanpay/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
</ruleset>