-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
52 lines (42 loc) · 1.92 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
50
51
52
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="LearnDash" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<!-- For help in understanding this file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- For help in using PHPCS: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- What to scan -->
<file>.</file>
<!-- Ignoring Files and Folders:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<exclude-pattern>vendor/</exclude-pattern>
<!-- How to scan -->
<!-- Formats of the report -->
<arg name="report" value="full,summary,source"/>
<!-- Show results with colors -->
<arg name="colors"/>
<!-- Enables cache -->
<arg name="cache"/>
<!-- Enables parallel processing when available for faster results. -->
<arg name="parallel" value="50"/>
<!-- Limit to PHP files -->
<arg name="extensions" value="php"/>
<!-- For help in understanding this custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<rule ref="WordPress">
<!-- Ignoring YODA rule -->
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound"/>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
<!-- Run our own sniffs against this repository -->
<rule ref="LearnDash"/>
</ruleset>