Noticed the user_relationships hook_menu comment was missing, so ran module through coder and then fixed some areas coder didn't pick up.

Files: 
CommentFileSizeAuthor
#3 user_relationship-1607020-coding-standards_3.patch71.34 KBhefox
user_relationship-coding-standards.patch68.99 KBhefox
FAILED: [[SimpleTest]]: [MySQL] 1,038 pass(es), 15 fail(s), and 1 exception(s).
[ View ]

Comments

Status:Needs review» Needs work

The last submitted patch, user_relationship-coding-standards.patch, failed testing.

Category:feature» task

Thanks!

The problem with fixing coding style is that it often conflicts with other patches but there aren't many big ones needs review currently. Let's fix a few additional things while we're at it (see below) and then I'll commit it.

+++ b/tests/user_relationships_test.moduleundefined
@@ -4,4 +4,3 @@
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */

Let's fix this as well while you're at it. Add a @todo stating that this only exists to define test dependencies.

+++ b/user_relationship_mailer/user_relationship_mailer.moduleundefined
@@ -119,65 +120,65 @@ function user_relationship_mailer_user_relationships_delete($relationship, $acti
+  //compose a list of possible replacement keys for email templates
+  $replacement_keys = array_keys(user_relationship_mailer_replacements());
+  //these two are added per-recipient in user_relationship_mailer_send_email()

While you're at it, can you fix the comments of *changed* (not everything, that would be too much) lines as well? This isn't reported by coder.module but comments should start with a space, then an uppercase character and end with a ".".

+++ b/user_relationship_node_access/user_relationship_node_access.moduleundefined
@@ -111,7 +111,7 @@ function user_relationship_node_access_user_presave(&$edit, $account, $category)
/**
- * Implements hook_form_BASE_alter()
+ * Implements hook_form_BASE_FORM_ID_alter() for node_form.

Haven't seen this before, interesting...

+++ b/user_relationship_node_access/user_relationship_node_access.moduleundefined
@@ -442,8 +446,11 @@ function _user_relationship_node_access_load_node_perms($nid = NULL) {
+ *   TRUE iff permissions on the node may be set for related users

Same here, let's fix stuff that we touch.

"iff" => "if"

+++ b/user_relationships.author-pane.incundefined
@@ -25,7 +25,7 @@ function user_relationships_preprocess_author_pane(&$variables) {
-    $rtids = array($rtids);//wrap into array for now, while selection is single
+    $rtids = array($rtids); //wrap into array for now, while selection is single

The correct thing to do here is actually to move the comment above and format properly.

Title:Fix coding standards?Fix coding standards
StatusFileSize
new71.34 KB

the first patch was mostly automated via http://upgrade.boombatower.com/tools, then ran it through coder locally to fix what it couldn't fix, then fixed some additional items like the hook_menu.

Anyhow updated patch with above.

Status:Needs work» Closed (duplicate)

Thanks, haven't done a second review so this might not be perfect but it's a huge step in the right direction. Commited.