-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
54 lines (46 loc) · 2.02 KB
/
Copy pathphpcs.xml
File metadata and controls
54 lines (46 loc) · 2.02 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
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0"?>
<ruleset name="UzDevidTelegramBot">
<description>Coding standard for uzdevid/php-telegram-bot.</description>
<file>src</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/.git/*</exclude-pattern>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg value="p"/>
<!--
The project intentionally does not follow every PSR-12 formatting rule
(e.g. opening braces for classes/methods on the same line, aligned
constructor-promoted parameters). Rather than pulling in the full PSR12
standard (which would flag virtually every existing file), this ruleset
cherry-picks the sniffs that match the project's actual conventions.
-->
<rule ref="PSR1"/>
<!-- Silence the "declare new symbols or cause side effects, not both" warning:
library classes routinely both declare a class and start with a namespace
declaration / use imports, which the sniff otherwise misreports. -->
<rule ref="PSR1.Files.SideEffects">
<severity>0</severity>
</rule>
<!-- Enforce 4-space indentation (no tabs) -->
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
</properties>
</rule>
<!-- Line length: warn at 120, no hard limit -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<!-- Basic naming/formatting sanity checks that already match the codebase -->
<rule ref="Squiz.Classes.ValidClassName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.PHP.LowerCaseType"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
</ruleset>