forked from braintree/braintree_php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpcs.xml
40 lines (33 loc) · 1.45 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
35
36
37
38
39
40
<?xml version="1.0"?>
<ruleset name="MyRuleset">
<description>Coding standard based on internal Braintree coding practices.</description>
<!-- PSR-12 is the latest PHP published standard for code style.
This ruleset includes PSR1 & 2 -->
<rule ref="PSR12"/>
<!-- Exclude some rules -->
<!-- This rule pops up for Braintree.php and test files,
and aren't really that smelly for those instances -->
<rule ref="PSR1.Files.SideEffects">
<exclude name="PSR1.Files.SideEffects"/>
</rule>
<!-- Our tests use a syntax `methodname_doesAThingWeTest` so let's ignore -->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- We mark internal properties and methods with `_`
so let's ignore these two rules to save ignore comment lines -->
<rule ref="PSR2.Classes.PropertyDeclaration">
<exclude name="PSR2.Classes.PropertyDeclaration"/>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration">
<exclude name="PSR2.Methods.MethodDeclaration"/>
</rule>
<!-- NEXT_MAJOR_VERSION remove this rule and add visibility modifiers,
https://www.php.net/manual/en/language.oop5.constants.php -->
<rule ref="PSR12.Properties.ConstantVisibility">
<exclude name="PSR12.Properties.ConstantVisibility"/>
</rule>
</ruleset>