-
Notifications
You must be signed in to change notification settings - Fork 5
/
phpcs.xml
49 lines (41 loc) · 1.81 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
41
42
43
44
45
46
47
48
49
<?xml version="1.0"?>
<ruleset name="DataValuesTime">
<!-- This rule set includes all rules from the MediaWiki rule set, see
https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/MediaWiki/ruleset.xml
-->
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<!-- The function comment sniff is way to rigorous about way to many details that need
exceptions:
* It complains about missing documentation on fully self-explanatory function headers
with strict type hints.
* It complains about missing documentation if there is a proper @see tag.
* It complains about duplicate spaces in "@param <type> $<var>", but removing these
doesn't make the code easier to read.
* It does not understand "@param <type> [$optional,…]. -->
<exclude name="MediaWiki.Commenting.FunctionComment" />
<!-- Even if we encourage to use spaces in comments, we don't think this sniff should block
patches from being merged. -->
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment" />
<!-- We really ought to fix this one. -->
<exclude name="Generic.Arrays.DisallowLongArraySyntax" />
</rule>
<!-- Metrics are intentionally not part of the base Wikibase CodeSniffer rule set. -->
<rule ref="Generic.Metrics.CyclomaticComplexity" />
<rule ref="Generic.Metrics.NestingLevel" />
<rule ref="MediaWiki.Commenting.ClassLevelLicense">
<properties>
<property name="license" value="GPL-2.0-or-later" />
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120" />
</properties>
</rule>
<rule ref="Generic.NamingConventions.UpperCaseConstantName">
<exclude-pattern>TimeValue\.php</exclude-pattern>
</rule>
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />
</ruleset>