Mercurial > hg > cmmr2012-drupal-site
annotate vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/ruleset.xml @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?xml version="1.0"?> |
Chris@0 | 2 <ruleset name="PSR1"> |
Chris@0 | 3 <description>The PSR1 coding standard.</description> |
Chris@0 | 4 |
Chris@0 | 5 <!-- 2. Files --> |
Chris@0 | 6 |
Chris@0 | 7 <!-- 2.1. PHP Tags --> |
Chris@0 | 8 |
Chris@0 | 9 <!-- PHP code MUST use the long <?php ?> tags or the short-echo <?= ?> tags; it MUST NOT use the other tag variations. --> |
Chris@0 | 10 <rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound"> |
Chris@0 | 11 <severity>0</severity> |
Chris@0 | 12 </rule> |
Chris@0 | 13 |
Chris@0 | 14 <!-- 2.2. Character Encoding --> |
Chris@0 | 15 |
Chris@0 | 16 <!-- PHP code MUST use only UTF-8 without BOM. --> |
Chris@0 | 17 <rule ref="Generic.Files.ByteOrderMark"/> |
Chris@0 | 18 |
Chris@0 | 19 <!-- 2.3. Side Effects --> |
Chris@0 | 20 |
Chris@0 | 21 <!-- 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@0 | 22 <!-- checked in Files/SideEffectsSniff --> |
Chris@0 | 23 |
Chris@0 | 24 <!-- 3. Namespace and Class Names --> |
Chris@0 | 25 |
Chris@0 | 26 <!-- Namespaces and classes MUST follow PSR-0. |
Chris@0 | 27 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@0 | 28 <!-- checked in Classes/ClassDeclarationSniff --> |
Chris@0 | 29 |
Chris@0 | 30 <!-- Class names MUST be declared in StudlyCaps. --> |
Chris@0 | 31 <rule ref="Squiz.Classes.ValidClassName"/> |
Chris@0 | 32 |
Chris@0 | 33 <!-- 4. Class Constants, Properties, and Methods --> |
Chris@0 | 34 |
Chris@0 | 35 <!-- 4.1. Constants --> |
Chris@0 | 36 |
Chris@0 | 37 <!-- Class constants MUST be declared in all upper case with underscore separators. --> |
Chris@0 | 38 <rule ref="Generic.NamingConventions.UpperCaseConstantName"/> |
Chris@0 | 39 |
Chris@0 | 40 <!-- 4.3. Methods --> |
Chris@0 | 41 |
Chris@0 | 42 <!-- Method names MUST be declared in camelCase(). --> |
Chris@0 | 43 <!-- checked in Methods/CamelCapsMethodNameSniff --> |
Chris@0 | 44 |
Chris@0 | 45 </ruleset> |