Passed
Pull Request — master (#3107)
by Christian
07:14
created
sites/default/boinc/modules/node_comment_block/node_comment_block.module 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
   if (is_array($element)) {
43 43
     show($element);
44 44
     return drupal_render($element);
45
-  }
46
-  else {
45
+  } else {
47 46
     // Safe-guard for inappropriate use of render() on flat variables: return
48 47
     // the variable as-is.
49 48
     return $element;
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module 2 patches
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -280,12 +280,12 @@  discard block
 block discarded – undo
280 280
   }
281 281
 
282 282
   switch ($op) {
283
-    case 'delete':
284
-      // Only call delete function on certain node types
285
-      if (in_array( $node->type, $node_types)) {
286
-        boinc_solr_comments_delete($node);
287
-      }
288
-      break;
283
+  case 'delete':
284
+    // Only call delete function on certain node types
285
+    if (in_array( $node->type, $node_types)) {
286
+      boinc_solr_comments_delete($node);
287
+    }
288
+    break;
289 289
   } //switch
290 290
 }
291 291
 
@@ -335,13 +335,13 @@  discard block
 block discarded – undo
335 335
  */
336 336
 function boinc_solr_comments_comment(&$a1, $op) {
337 337
   switch ($op) {
338
-    case 'view':
339
-    case 'update':
340
-      break;
341
-    case 'delete':
342
-      // $a1 should be a comment object
343
-      boinc_solr_comments_deletecomment($a1);
344
-      break;
338
+  case 'view':
339
+  case 'update':
340
+    break;
341
+  case 'delete':
342
+    // $a1 should be a comment object
343
+    boinc_solr_comments_deletecomment($a1);
344
+    break;
345 345
   }// switch
346 346
 }
347 347
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,8 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($comment->uid == 0 || strlen($comment->name) == 0) {
132 132
           // @see user_validate_name(). !'0' === TRUE.
133 133
           $comment_document->ss_name = '0';
134
-        }
135
-        else {
134
+        } else {
136 135
           $comment_document->ss_name = $comment->name;
137 136
           // We want the name to be searchable for keywords.
138 137
           $comment_document->tos_name = $comment->name;
@@ -318,8 +317,7 @@  discard block
 block discarded – undo
318 317
     $solr->deleteByQuery($query);
319 318
     // Log the query used for deletion.
320 319
     watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
321
-  }
322
-  catch (Exception $e) {
320
+  } catch (Exception $e) {
323 321
       watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
324 322
       return FALSE;
325 323
   }// try
@@ -376,8 +374,7 @@  discard block
 block discarded – undo
376 374
     $solr->deleteByQuery($query);
377 375
     // Log the query used for deletion.
378 376
     watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
379
-    }
380
-  catch (Exception $e) {
377
+    } catch (Exception $e) {
381 378
     watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
382 379
     return FALSE;
383 380
   }// try
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
   foreach (content_types() as $key => $info) {
20 20
     // Exclude node types profile, team, and panel
21 21
     switch ($key) {
22
-      case 'profile':
23
-      case 'team':
24
-      case 'panel':
25
-        continue 2;
22
+    case 'profile':
23
+    case 'team':
24
+    case 'panel':
25
+      continue 2;
26 26
     }// switch key
27 27
     $options[$key] = $info['name'];
28 28
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.module 2 patches
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -180,12 +180,12 @@
 block discarded – undo
180 180
  */
181 181
 function boincwork_locale($op = 'groups', $group = NULL) {
182 182
   switch ($op) {
183
-    case 'groups':
184
-      return array('project' => bts('Project'));
185
-    case 'info':
186
-      $info['project']['refresh callback'] = 'boincwork_locale_refresh';
187
-      $info['project']['format'] = FALSE;
188
-      return $info;
183
+  case 'groups':
184
+    return array('project' => bts('Project'));
185
+  case 'info':
186
+    $info['project']['refresh callback'] = 'boincwork_locale_refresh';
187
+    $info['project']['format'] = FALSE;
188
+    return $info;
189 189
   }
190 190
 }
191 191
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -279,8 +279,7 @@  discard block
 block discarded – undo
279 279
         'href' => 'account/prefs/privacy/ignore_user/remove/'. $author->uid,
280 280
         'query' => 'destination=messages/view/' . $thread_id,
281 281
       );
282
-    }
283
-    else {
282
+    } else {
284 283
       $vars['message_actions']['ignore_user'] = array(
285 284
         'title' => bts('Ignore User', array(), NULL, 'boinc:ignore-user-add'),
286 285
         'href' => 'account/prefs/privacy/ignore_user/add/'. $author->uid,
@@ -387,8 +386,7 @@  discard block
 block discarded – undo
387 386
             }
388 387
             if (!$special) {
389 388
               $output .= "<td>{$value} {$pref_setting['#field_suffix']}</td>";
390
-            }
391
-            else {
389
+            } else {
392 390
               // The "very special" case where we merge two prefs
393 391
               $second_pref = $special_map[$name];
394 392
               $second_pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$second_pref];
@@ -396,8 +394,7 @@  discard block
 block discarded – undo
396 394
               $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}" .
397 395
                 " {$second_value} {$second_pref_setting['#field_suffix']} </td>";
398 396
             }
399
-          }
400
-          else  {
397
+          } else {
401 398
             $output .= '<td>---</td>';
402 399
           }
403 400
         }
@@ -923,22 +920,19 @@  discard block
 block discarded – undo
923 920
         drupal_set_message(t('Host @id has been removed from your account.',
924 921
           array('@id' => $host_id)));
925 922
         drupal_goto('account/computers');
926
-      }
927
-      else {
923
+      } else {
928 924
         drupal_set_message(t('Host @id could not be deleted. Not sure why...',
929 925
           array('@id' => $host_id)), 'error'
930 926
         );
931 927
       }
932
-    }
933
-    else {
928
+    } else {
934 929
       drupal_set_message(t('Host @id cannot be deleted because it still has
935 930
         tasks associated with it. These tasks should be processed within the
936 931
         next few days, after which the host can be deleted.', 
937 932
         array('@id' => $host_id)), 'warning'
938 933
       );
939 934
     }
940
-  }
941
-  else {
935
+  } else {
942 936
     drupal_set_message(t('You are not the owner of host @id, so you cannot
943 937
       delete it.', 
944 938
       array('@id' => $host_id)), 'error'
@@ -986,15 +980,13 @@  discard block
 block discarded – undo
986 980
         bts('The location for this host has been updated.', array(), NULL, 'boinc:account-host-details')
987 981
         . bts('This will take effect next time the host contacts the project.', array(), NULL, 'boinc:account-host-details')
988 982
       );
989
-    }
990
-    else {
983
+    } else {
991 984
       drupal_set_message(
992 985
         bts('Unable to save changes to this host for some reason!', array(), NULL, 'boinc:account-host-details'),
993 986
         'error'
994 987
       );
995 988
     }
996
-  }
997
-  else {
989
+  } else {
998 990
     drupal_set_message(
999 991
       bts('You are not allowed to make changes to this host.', array(), NULL, 'boinc:account-host-details'),
1000 992
       'warning'
@@ -1129,8 +1121,7 @@  discard block
 block discarded – undo
1129 1121
       $venue = $active_venue;
1130 1122
       //unset($_SESSION['prefs venue']);
1131 1123
     }
1132
-  }
1133
-  else {
1124
+  } else {
1134 1125
     // Set the active venue to keep it selected between computing and project
1135 1126
     // preference pages
1136 1127
     $_SESSION['prefs venue'] = $venue;
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinctranslate/boinctranslate.admin.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -220,8 +220,7 @@  discard block
 block discarded – undo
220 220
   if (!$values['boinc_translate_transifex_pass']) {
221 221
     if (!variable_get('boinc_translate_transifex_pass', '')) {
222 222
       form_set_error('boinc_translate_transifex_pass', t('Password is required.'));
223
-    }
224
-    else {
223
+    } else {
225 224
       unset($form_state['values']['boinc_translate_transifex_pass']);
226 225
     }
227 226
   }
@@ -260,8 +259,7 @@  discard block
 block discarded – undo
260 259
           'boinc_translate_transifex_pass',
261 260
           t('Transifex authentication failed.')
262 261
         );
263
-      }
264
-      else {
262
+      } else {
265 263
         $authenticated = TRUE;
266 264
       }
267 265
     }
@@ -278,14 +276,12 @@  discard block
 block discarded – undo
278 276
       );
279 277
       if ($project_name AND $project_resources) {
280 278
         $transifex_resources[$project_name] = $project_resources;
281
-      }
282
-      elseif ($project_name AND !$project_resources) {
279
+      } elseif ($project_name AND !$project_resources) {
283 280
         drupal_set_message(
284 281
           t('No project-specific resources were provided'),
285 282
           'warning'
286 283
         );
287
-      }
288
-      elseif ($project_resources AND !$project_name) {
284
+      } elseif ($project_resources AND !$project_name) {
289 285
         drupal_set_message(
290 286
           t('No project-specific Transifex project name was provided'),
291 287
           'warning'
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.admin.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -157,13 +157,11 @@  discard block
 block discarded – undo
157 157
   if (!$values['boinc_root_dir']) {
158 158
     form_set_error('boinc_root_dir', t('BOINC project root directory must be
159 159
       defined!'));
160
-  }
161
-  elseif (!is_dir($values['boinc_root_dir'])) {
160
+  } elseif (!is_dir($values['boinc_root_dir'])) {
162 161
     form_set_error('boinc_root_dir', t('BOINC project root not found at %directory',
163 162
       array('%directory' => $values['boinc_root_dir'])
164 163
     ));
165
-  }
166
-  else {
164
+  } else {
167 165
     // By default, try to automatically set specific directories from the root
168 166
     if (!$values['boinc_config_xml_dir']) {
169 167
       $values['boinc_config_xml_dir'] = $values['boinc_root_dir'];
@@ -285,8 +283,7 @@  discard block
 block discarded – undo
285 283
   if (!$values['boinc_scheduler_urls']) {
286 284
     form_set_error('boinc_scheduler_urls', t('At least one scheduling server
287 285
       URL must be specified.'));
288
-  }
289
-  else {
286
+  } else {
290 287
     $urls = explode("\r\n", $values['boinc_scheduler_urls']);
291 288
     foreach ($urls as $key => $url) {
292 289
       if (!$url) {
Please login to merge, or discard this patch.
sites/all/features/global_search_solr/global_search_solr.features.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,11 +7,9 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "apachesolr" && $api == "apachesolr_environments") {
9 9
     return array("version" => 1);
10
-  }
11
-  elseif ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") {
10
+  } elseif ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") {
12 11
     return array("version" => 3);
13
-  }
14
-  elseif ($module == "facetapi" && $api == "facetapi_defaults") {
12
+  } elseif ($module == "facetapi" && $api == "facetapi_defaults") {
15 13
     return array("version" => 1);
16 14
   }
17 15
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/boinc_standard/boinc_standard.features.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,17 +7,13 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "input_formats" && $api == "input_formats") {
9 9
     return array("version" => 1);
10
-  }
11
-  elseif ($module == "page_manager" && $api == "pages_default") {
10
+  } elseif ($module == "page_manager" && $api == "pages_default") {
12 11
     return array("version" => 1);
13
-  }
14
-  elseif ($module == "panels_mini" && $api == "panels_default") {
12
+  } elseif ($module == "panels_mini" && $api == "panels_default") {
15 13
     return array("version" => 1);
16
-  }
17
-  elseif ($module == "strongarm" && $api == "strongarm") {
14
+  } elseif ($module == "strongarm" && $api == "strongarm") {
18 15
     return array("version" => 1);
19
-  }
20
-  elseif ($module == "wysiwyg" && $api == "wysiwyg") {
16
+  } elseif ($module == "wysiwyg" && $api == "wysiwyg") {
21 17
     return array("version" => 2);
22 18
   }
23 19
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/news/news.features.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "context" && $api == "context") {
9 9
     return array("version" => 3);
10
-  }
11
-  elseif ($module == "strongarm" && $api == "strongarm") {
10
+  } elseif ($module == "strongarm" && $api == "strongarm") {
12 11
     return array("version" => 1);
13 12
   }
14 13
 }
Please login to merge, or discard this patch.