Created
February 20, 2009 15:18
-
-
Save hugowetterberg/67507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sites/all/modules/coder/includes/coder_style.inc b/sites/all/modules/coder/includes/coder_style.inc | |
index 5330b6c..2a52b0f 100644 | |
--- a/sites/all/modules/coder/includes/coder_style.inc | |
+++ b/sites/all/modules/coder/includes/coder_style.inc | |
@@ -47,8 +47,8 @@ function coder_style_reviews() { | |
), | |
array( | |
'#type' => 'regex', | |
- '#value' => '(\.\s\'\'|\'\'\s\.|\.\s""|\.\s"")', | |
- '#warning' => 'string concatenation should be formatted without a space separating the operators (dot .) and a quote', | |
+ '#value' => '(\.\'\'|\'\'\.|\.""|\."")', | |
+ '#warning' => 'string concatenation should be formatted with a space separating the operators (dot .) and a quote', | |
), | |
array( | |
'#type' => 'regex', | |
@@ -90,11 +90,16 @@ function coder_style_reviews() { | |
), | |
array( | |
'#type' => 'regex', | |
- '#value' => '(?-i)(function\s+|\$)(([a-z]+[A-Z]+([a-z]*[A-Z]*)*)|([A-Z]+[a-z]+([A-Z]*[a-z]*)*))', | |
+ '#value' => '(?-i)(^\s*function\s+|([^:]{2}&[^-][^->])\$)(([a-z]+[A-Z]+([a-z]*[A-Z]*)*)|([A-Z]+[a-z]+([A-Z]*[a-z]*)*))', | |
'#warning' => 'do not use mixed case (camelCase), use lower case and _', | |
), | |
array( | |
'#type' => 'regex', | |
+ '#value' => '(?-i)(public|private|protected)\s+function\s+[a-z](([a-z]+_+([a-z]*_*)*)|(_+[a-z]+(_*[a-z]*)*))', | |
+ '#warning' => 'use camelCase for class methods', | |
+ ), | |
+ array( | |
+ '#type' => 'regex', | |
'#value' => '\s(stdclass)\s*\(', | |
'#not' => '^(?-i)stdClass$', | |
'#warning' => 'use stdClass caseCapitalization, it\'s the one exception to the mixed case style standard', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment