.phpcs.xml 1.74 KB
Newer Older
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
<?xml version="1.0" encoding="UTF-8"?>

<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
         name="Custom Standard"
         namespace="MyProject\CS\Standard">

<!--
    If no files or directories are specified on the command line
    your custom standard can specify what files should be checked
    instead.

    Note that file and directory paths specified in a ruleset are
    relative to the ruleset's location, and that specifying any file or
    directory path on the command line will ignore all file tags.
-->
    <file>config/</file>
    <file>src/</file>
    <file>tests/</file>
    <file>templates/</file>
    <file>public/</file>
    <!--    <file>bin/</file> -->

<!--
   Include all sniffs in the x standard. Note that the
   path to the standard does not have to be specified as the
   x standard exists inside the PHP_CodeSniffer install directory.
-->
29
    <rule ref="PHPCompatibility"/>
30
31
32
    <rule ref="PSR12">
        <!-- <exclude-pattern>bin/.phpunit/</exclude-pattern> -->
    </rule>
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

<!--
   You can hard-code command line values into your custom standard.
   Note that this does not work for the command line values:
   -v[v][v], -l, -d,  -·-sniffs and -·-standard
-->
    <arg value="s"/>      <!-- Show sniff codes in all reports -->
    <arg name="colors"/>
    <arg name="basepath" value="."/>
    <arg name="cache" value=".phpcs-cache"/>
    <arg name="extensions" value="php"/>

    <!-- Summary report: each filename with number of errors + warnings -->
        <!-- <arg name="report" value="summary"/> -->

    <!-- Source report: each sniff with numbers of failed files -->
        <!-- <arg name="report" value="source"/> -->

</ruleset>