-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml.dist
43 lines (37 loc) · 1.52 KB
/
phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"
name="SyntatisCommand"
>
<description>Curated PHP Coding Standards for PHP</description>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="tab-width" value="4"/>
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>
<!-- The directories to apply the rules -->
<file>./app/</file>
<file>./tests/</file>
<file>./bin/codex</file>
<!-- Show the warning but exit with 0. The Warning is fine -->
<config name="ignore_warnings_on_exit" value="1"/>
<!-- Check for cross-version support for PHP 7.4 or higher. Requires PHPCompatibilityWP -->
<config name="testVersion" value="7.4-"/>
<!-- Rulesets -->
<rule ref="Syntatis"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="app" value="Syntatis\Codex\Companion"/>
<element key="tests/phpunit/app" value="Syntatis\Tests"/>
<element key="tests/phpunit" value="Syntatis\Tests"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint" />
</rule>
<rule ref="PHPCompatibility"/>
</ruleset>