]> git.openstreetmap.org Git - nominatim.git/blobdiff - phpcs.xml
Merge pull request #974 from mtmail/remove-two-minute-data-date-offset
[nominatim.git] / phpcs.xml
index 2f4bc11823b89be57f01c1df771f00b33d08beda..a48b5c3e608db00b6ad24a4e3d979af7537e581d 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -8,6 +8,12 @@
   <!-- https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PSR2/ruleset.xml -->
   <rule ref="PSR2"/>
 
   <!-- https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PSR2/ruleset.xml -->
   <rule ref="PSR2"/>
 
+  <exclude-pattern>./lib/template/*html*</exclude-pattern>
+  <exclude-pattern>./lib/template/includes/</exclude-pattern>
+  <exclude-pattern>./module/</exclude-pattern>
+  <exclude-pattern>./website/css</exclude-pattern>
+  <exclude-pattern>./website/js</exclude-pattern>
+
   <rule ref="Generic.Files.LineLength">
     <properties>
      <property name="lineLimit" value="194"/>
   <rule ref="Generic.Files.LineLength">
     <properties>
      <property name="lineLimit" value="194"/>
        INDENTATION, SPACING
        ************************************************************** -->
 
        INDENTATION, SPACING
        ************************************************************** -->
 
-  <!-- We don't need 2 blank lines after function -->
-  <rule ref="Squiz.WhiteSpace.FunctionSpacing.After">
-    <severity>0</severity>
-  </rule>
-
-  <!-- Aligned looks nicer, but causes too many warnings currently -->
-  <rule ref="Generic.Formatting.MultipleStatementAlignment.NotSame">
-    <severity>0</severity>
-  </rule>
-  <rule ref="Generic.Formatting.MultipleStatementAlignment.NotSameWarning">
-    <severity>0</severity>
-  </rule>
-
   <!-- Aligned looks nicer, but causes too many warnings currently -->
   <rule ref="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned">
     <severity>0</severity>
   <!-- Aligned looks nicer, but causes too many warnings currently -->
   <rule ref="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned">
     <severity>0</severity>
 
 
 
 
 
 
+
+  <!-- **************************************************************
+       STRING QUOTING
+       ************************************************************** -->
+
+  <!-- Prefer single quoted strings -->
+  <rule ref="Squiz.Strings.DoubleQuoteUsage" />
+
+  <!-- We allow variabled inside double-quoted strings "abc $somevar" -->
+  <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
+    <severity>0</severity>
+  </rule>
+
+
+
+
+
   <!-- **************************************************************
        CONTROL STRUCTURES
        ************************************************************** -->
   <!-- **************************************************************
        CONTROL STRUCTURES
        ************************************************************** -->