Chris@17
|
1 <?xml version="1.0"?>
|
Chris@17
|
2 <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PSR1" xsi:noNamespaceSchemaLocation="../../../phpcs.xsd">
|
Chris@17
|
3 <description>The PSR1 coding standard.</description>
|
Chris@17
|
4
|
Chris@17
|
5 <!-- 2. Files -->
|
Chris@17
|
6
|
Chris@17
|
7 <!-- 2.1. PHP Tags -->
|
Chris@17
|
8
|
Chris@17
|
9 <!-- PHP code MUST use the long <?php ?> tags or the short-echo <?= ?> tags; it MUST NOT use the other tag variations. -->
|
Chris@17
|
10 <rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
Chris@17
|
11 <rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound">
|
Chris@17
|
12 <severity>0</severity>
|
Chris@17
|
13 </rule>
|
Chris@17
|
14
|
Chris@17
|
15 <!-- 2.2. Character Encoding -->
|
Chris@17
|
16
|
Chris@17
|
17 <!-- PHP code MUST use only UTF-8 without BOM. -->
|
Chris@17
|
18 <rule ref="Generic.Files.ByteOrderMark"/>
|
Chris@17
|
19
|
Chris@17
|
20 <!-- 2.3. Side Effects -->
|
Chris@17
|
21
|
Chris@17
|
22 <!-- A file SHOULD declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it SHOULD execute logic with side effects, but SHOULD NOT do both. -->
|
Chris@17
|
23 <!-- checked by PSR1.Files.SideEffects -->
|
Chris@17
|
24
|
Chris@17
|
25 <!-- 3. Namespace and Class Names -->
|
Chris@17
|
26
|
Chris@17
|
27 <!-- Namespaces and classes MUST follow PSR-0.
|
Chris@17
|
28 This means each class is in a file by itself, and is in a namespace of at least one level: a top-level vendor name. -->
|
Chris@17
|
29 <!-- checked by PSR1.Classes.ClassDeclaration -->
|
Chris@17
|
30
|
Chris@17
|
31 <!-- Class names MUST be declared in StudlyCaps. -->
|
Chris@17
|
32 <rule ref="Squiz.Classes.ValidClassName"/>
|
Chris@17
|
33
|
Chris@17
|
34 <!-- 4. Class Constants, Properties, and Methods -->
|
Chris@17
|
35
|
Chris@17
|
36 <!-- 4.1. Constants -->
|
Chris@17
|
37
|
Chris@17
|
38 <!-- Class constants MUST be declared in all upper case with underscore separators. -->
|
Chris@17
|
39 <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
Chris@17
|
40
|
Chris@17
|
41 <!-- 4.3. Methods -->
|
Chris@17
|
42
|
Chris@17
|
43 <!-- Method names MUST be declared in camelCase(). -->
|
Chris@17
|
44 <!-- checked by PSR1.Methods.CamelCapsMethodName -->
|
Chris@17
|
45
|
Chris@17
|
46 </ruleset>
|