-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.phpcs.xml
39 lines (32 loc) · 1.51 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
<?xml version="1.0"?>
<ruleset>
<!-- 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" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<!-- 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" />
</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="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120" />
</properties>
</rule>
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />
</ruleset>