minor improvement to tabs style
[openemr.git] / phpcs.xml
blob36582f3d0dc0b696257eb461d9db702810c83e96
1 <?xml version="1.0"?>
2 <ruleset name="OpenEMR Standard">
3   <description>PSR2 without namespace enforcement.</description>
4   <arg name="tab-width" value="4" />
5   <!-- PHP code MUST use only UTF-8 without BOM. -->
6   <rule ref="Generic.Files.ByteOrderMark" />
7   <!-- Checks that the opening PHP tag is the first content in a file. -->
8   <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" />
9   <!-- Makes sure that shorthand PHP open tags are not used. -->
10   <rule ref="Generic.PHP.DisallowShortOpenTag" />
11   <!-- PHP Files should end with exactly one newline. -->
12   <rule ref="PSR2.Files.EndFileNewline" />
13   <!-- There MUST NOT be more than one statement per line. -->
14   <rule ref="Generic.Formatting.DisallowMultipleStatements" />
15   <!-- Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. When the argument list is split across multiple lines, the closing parenthesis and opening brace MUST be placed together on their own line with one space between them. -->
16   <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
17   <!-- Lines can be 120 chars long, but never show errors -->
18   <rule ref="Generic.Files.LineLength">
19     <properties>
20       <property name="lineLimit" value="120" />
21       <property name="absoluteLineLimit" value="0" />
22     </properties>
23   </rule>
24   <!-- Use Unix newlines -->
25   <rule ref="Generic.Files.LineEndings">
26     <properties>
27       <property name="eolChar" value="\n" />
28     </properties>
29   </rule>
30   <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
31   <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
32     <properties>
33       <property name="ignoreBlankLines" value="true" />
34     </properties>
35   </rule>
36   <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
37     <severity>0</severity>
38   </rule>
39   <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
40     <severity>0</severity>
41   </rule>
42   <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
43     <severity>0</severity>
44   </rule>
45   <!-- Indenting -->
46   <!-- Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting. -->
47   <rule ref="Generic.WhiteSpace.ScopeIndent">
48     <properties>
49       <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT_OPEN_TAG" />
50     </properties>
51   </rule>
52   <rule ref="Generic.WhiteSpace.DisallowTabIndent" />
53   <rule ref="Generic.WhiteSpace.ScopeIndent" />
54   <!-- Keywords and True/False/Null -->
55   <!-- PHP keywords MUST be in lower case. -->
56   <rule ref="Generic.PHP.LowerCaseKeyword" />
57   <!-- The PHP constants true, false, and null MUST be in lower case. -->
58   <rule ref="Generic.PHP.LowerCaseConstant" />
59   <exclude-pattern>*/vendor/*</exclude-pattern>
60   <exclude-pattern>*/Documentation/*</exclude-pattern>
61   <exclude-pattern>*/tests/*</exclude-pattern>
62   <exclude-pattern>*/gacl/*</exclude-pattern>
63   <exclude-pattern>*/images/*</exclude-pattern>
64   <exclude-pattern>*/public/assets/*</exclude-pattern>
65   <exclude-pattern>*/node_modules/*</exclude-pattern>
66   <exclude-pattern>*/bower_components/*</exclude-pattern>
67 </ruleset>