Passed
Pull Request — master (#3042)
by Christian
07:09
created
drupal/sites/default/boinc/modules/boincteam/boincteam.admin.inc 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
   // This variable name has been changed for Drupal 7/8.
44 44
   $maintenance_mode = variable_get('site_offline');
45 45
   if (!$maintenance_mode) {
46
-    drupal_set_message(t('WARNING: Site is online (not in maintenance mode)! Deleting teams is only allowed when site is offline. Change this setting in ') . l(t('Site maintenance'), '/admin/settings/site-maintenance'), 'warning');
46
+    drupal_set_message(t('WARNING: Site is online (not in maintenance mode)! Deleting teams is only allowed when site is offline. Change this setting in ').l(t('Site maintenance'), '/admin/settings/site-maintenance'), 'warning');
47 47
   }
48 48
 
49 49
   $form['teamdelete'] = array(
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     '#value' => t('Delete Selected Teams'),
57 57
     '#submit' => array('boincteam_utility_delete_team'),
58 58
     '#attributes' => array(
59
-        'onclick' => 'return confirm(\'' . t('You are about to delete the selected teams suspected of being SPAM. Do you want to continue?') . '\')',
59
+        'onclick' => 'return confirm(\''.t('You are about to delete the selected teams suspected of being SPAM. Do you want to continue?').'\')',
60 60
     ),
61 61
   );
62 62
   $form['teamdelete']['results_table'] = array(
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 function boincteam_utility_team_table() {
70 70
 
71
-  $limit=50;
71
+  $limit = 50;
72 72
   $sql = "SELECT team.id AS id, team.name AS name, team.nusers AS nusers FROM {team} WHERE team.nusers<2 AND team.total_credit=0 AND team.seti_id=0 AND team.description REGEXP '<a href'";
73 73
 
74 74
   // @todo - add bts() or t()
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
   $tablesort = tablesort_sql($resultheader);
96 96
   db_set_active('boinc_rw');
97
-  $db_res = pager_query($sql . $tablesort, $limit);
97
+  $db_res = pager_query($sql.$tablesort, $limit);
98 98
   db_set_active('default');
99 99
 
100 100
   $form = array();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     while ($result = db_fetch_object($db_res)) {
105 105
       $drupalnid = boincteam_lookup_nid($result->id);
106 106
       if ($drupalnid) {
107
-        $tlink = l($result->name, '/community/teams/' . $drupalnid);
107
+        $tlink = l($result->name, '/community/teams/'.$drupalnid);
108 108
       }
109 109
       else {
110 110
         $tlink = '';
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     'operations' => $operations,
150 150
     'init_message' => t('Starting team deletion'),
151 151
     'finished' => 'boincteam_utility_batch_finished',
152
-    'file' => drupal_get_path('module', 'boincteam') . '/boincteam.admin.inc',
152
+    'file' => drupal_get_path('module', 'boincteam').'/boincteam.admin.inc',
153 153
   );
154 154
   batch_set($batch);
155 155
   //batch_process('/admin/boinc/utility-team-delete');
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
   );
174 174
   $rows = array();
175 175
   $output = "";
176
-  if(!empty($form['checkboxes']['#options'])) {
176
+  if (!empty($form['checkboxes']['#options'])) {
177 177
     foreach (element_children($form['id']) as $key) {
178 178
       $rows[] = array(
179 179
         drupal_render($form['checkboxes'][$key]),
@@ -207,12 +207,12 @@  discard block
 block discarded – undo
207 207
 
208 208
   // Delete entry in team table
209 209
   db_set_active('boinc_rw');
210
-  $sql1='DELETE FROM {team} WHERE id=%d';
210
+  $sql1 = 'DELETE FROM {team} WHERE id=%d';
211 211
   $db_res = db_query($sql1, $id);
212 212
   db_set_active('default');
213 213
 
214 214
   // Delete entry in boincteam table
215
-  $sql2='DELETE FROM {boincteam} WHERE id=%d';
215
+  $sql2 = 'DELETE FROM {boincteam} WHERE id=%d';
216 216
   $db_res = db_query($sql2, $id);
217 217
 
218 218
   // Delete the drupal node (if present)
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     node_delete($drupalid);
221 221
   }
222 222
 
223
-  $context['results'][] = $id . ' : ' . check_plain($boincteam->name);
223
+  $context['results'][] = $id.' : '.check_plain($boincteam->name);
224 224
   $context['message'] = t('Processing team @name', array('@name' => $boincteam->name));
225 225
 }
226 226
 
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
  */
231 231
 function boincteam_utility_batch_finished($success, $results, $operations) {
232 232
   if ($success) {
233
-    $message = 'Info: Delete SPAM Teams utility- ' . count($results) . ' team(s) deleted.';
233
+    $message = 'Info: Delete SPAM Teams utility- '.count($results).' team(s) deleted.';
234 234
     drupal_set_message($message, 'info');
235 235
   }
236 236
   else {
237 237
     // An error occurred.
238 238
     // $operations contains the operations that remained unprocessed.
239 239
     $error_operation = reset($operations);
240
-    $message = 'Error: An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
240
+    $message = 'Error: An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
241 241
     drupal_set_message($message, 'error');
242 242
   }
243 243
 }
244 244
\ No newline at end of file
Please login to merge, or discard this patch.
default/boinc/modules/boinctranslate/includes/boinctranslate.helpers.inc 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 function boinctranslate_initialize_languages() {
17 17
 
18
-  require_once(getcwd() . '/includes/locale.inc');
18
+  require_once(getcwd().'/includes/locale.inc');
19 19
 
20 20
   $api_base_url = 'https://www.transifex.com/api/2';
21 21
   $project_name = variable_get(
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
           }
147 147
         }
148 148
         if ($disabled_languages) {
149
-          drupal_set_message('The following languages were not found in Transifex and were disabled: ' . implode(' ', $disabled_languages));
149
+          drupal_set_message('The following languages were not found in Transifex and were disabled: '.implode(' ', $disabled_languages));
150 150
         }
151 151
         if ($process_batches) {
152 152
           $batch = array(
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
  *
196 196
  */
197 197
 function boinctranslate_export_translations() {
198
-  require_once(getcwd() . '/includes/locale.inc');
198
+  require_once(getcwd().'/includes/locale.inc');
199 199
   $project_name = variable_get(
200 200
     'boinc_translate_transifex_project_name', ''
201 201
   );
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
  *
298 298
  */
299 299
 function boinctranslate_update_official_boinc_translations() {
300
-  require_once(getcwd() . '/includes/locale.inc');
300
+  require_once(getcwd().'/includes/locale.inc');
301 301
   $project_name = variable_get(
302 302
     'boinc_translate_transifex_standard_name', ''
303 303
   );
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 
406 406
   $url = "{$api_base_url}/{$path}";
407 407
   $headers = array(
408
-    'Authorization' => 'Basic ' . base64_encode($username . ":" . $password),
408
+    'Authorization' => 'Basic '.base64_encode($username.":".$password),
409 409
   );
410 410
   $data = NULL;
411 411
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
       return json_decode($response->data, TRUE);
434 434
     }
435 435
     else {
436
-      return (string) $response->data;
436
+      return (string)$response->data;
437 437
     }
438 438
     break;
439 439
   case 404:
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
  */
457 457
 function boinctranslate_get_po($langcode, $type = 'standard') {
458 458
 
459
-  require_once(getcwd() . '/includes/locale.inc');
459
+  require_once(getcwd().'/includes/locale.inc');
460 460
 
461 461
   $all_languages = language_list();
462 462
   $language = $langcode ? $all_languages[$langcode] : NULL;
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
  */
516 516
 function boinctranslate_export_po_generate($language = NULL, $strings = array(), $header = NULL, $type = NULL) {
517 517
 
518
-  require_once(getcwd() . '/includes/locale.inc');
518
+  require_once(getcwd().'/includes/locale.inc');
519 519
   global $user;
520 520
 
521 521
   // unset $language to indicate template creation
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
       $header = "# BOINC drupal localization template\n";
532 532
       $header .= "# Copyright (C) ".date("Y")." University of California\n";
533 533
     }
534
-    $header .= '# Generated by ' . $user->name . ' <' . $user->mail . ">\n";
534
+    $header .= '# Generated by '.$user->name.' <'.$user->mail.">\n";
535 535
     $header .= "#\n";
536 536
     $header .= "# This file is distributed under the same license as BOINC.\n";
537 537
     $header .= "#\n";
@@ -543,9 +543,9 @@  discard block
 block discarded – undo
543 543
       $header .= "\"Project-Id-Version: BOINC unknown\\n\"\n"; // TODO: add SHA1 of source checkout here
544 544
     }
545 545
     $header .= "\"Report-Msgid-Bugs-To: BOINC translation team <[email protected]>\\n\"\n";
546
-    $header .= "\"POT-Creation-Date: " . date("Y-m-d H:iO") . "\\n\"\n";
546
+    $header .= "\"POT-Creation-Date: ".date("Y-m-d H:iO")."\\n\"\n";
547 547
     if (isset($language)) {
548
-      $header .= "\"PO-Revision-Date: " . date("Y-m-d H:iO") . "\\n\"\n";
548
+      $header .= "\"PO-Revision-Date: ".date("Y-m-d H:iO")."\\n\"\n";
549 549
     }
550 550
     $header .= "\"Last-Translator: Generated automatically from Drupal translate interface\\n\"\n";
551 551
     $header .= "\"MIME-Version: 1.0\\n\"\n";
@@ -554,31 +554,31 @@  discard block
 block discarded – undo
554 554
     if (isset($language)) {
555 555
       $header .= "\"Language: ".$language->language."\\n\"";
556 556
       if ($language->formula && $language->plurals) {
557
-        $header .= "\"Plural-Forms: nplurals=" . $language->plurals . "; plural=" . strtr($language->formula, array('$' => '')) . ";\\n\"\n";
557
+        $header .= "\"Plural-Forms: nplurals=".$language->plurals."; plural=".strtr($language->formula, array('$' => '')).";\\n\"\n";
558 558
       }
559 559
     }
560 560
     $header .= "\"X-Poedit-SourceCharset: utf-8\\n\"\n";
561 561
   }
562 562
 
563
-  $output = $header . "\n";
563
+  $output = $header."\n";
564 564
 
565 565
   foreach ($strings as $lid => $string) {
566 566
     // Only process non-children, children are output below their parent.
567 567
     if (!isset($string['child'])) {
568 568
       if ($string['comment']) {
569
-        $output .= '#: ' . $string['comment'] . "\n";
569
+        $output .= '#: '.$string['comment']."\n";
570 570
       }
571 571
       if ($string['context']) {
572
-        $output .= 'msgctxt "' . $string['context'] . "\"\n";
572
+        $output .= 'msgctxt "'.$string['context']."\"\n";
573 573
       }
574
-      $output .= 'msgid ' . _locale_export_string($string['source']);
574
+      $output .= 'msgid '._locale_export_string($string['source']);
575 575
       if (!empty($string['plural'])) {
576 576
         $plural = $string['plural'];
577
-        $output .= 'msgid_plural ' . _locale_export_string($strings[$plural]['source']);
577
+        $output .= 'msgid_plural '._locale_export_string($strings[$plural]['source']);
578 578
         if (isset($language)) {
579 579
           $translation = $string['translation'];
580 580
           for ($i = 0; $i < $language->plurals; $i++) {
581
-            $output .= 'msgstr[' . $i . '] ' . _locale_export_string($translation);
581
+            $output .= 'msgstr['.$i.'] '._locale_export_string($translation);
582 582
             if ($plural) {
583 583
               $translation = _locale_export_remove_plural($strings[$plural]['translation']);
584 584
               $plural = isset($strings[$plural]['plural']) ? $strings[$plural]['plural'] : 0;
@@ -589,12 +589,12 @@  discard block
 block discarded – undo
589 589
           }
590 590
         }
591 591
         else {
592
-          $output .= 'msgstr[0] ""' . "\n";
593
-          $output .= 'msgstr[1] ""' . "\n";
592
+          $output .= 'msgstr[0] ""'."\n";
593
+          $output .= 'msgstr[1] ""'."\n";
594 594
         }
595 595
       }
596 596
       else {
597
-        $output .= 'msgstr ' . _locale_export_string($string['translation']);
597
+        $output .= 'msgstr '._locale_export_string($string['translation']);
598 598
       }
599 599
       $output .= "\n";
600 600
     }
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
  *
607 607
  */
608 608
 function boinctranslate_refresh_translations() {
609
-  require_once(getcwd() . '/includes/locale.inc');
609
+  require_once(getcwd().'/includes/locale.inc');
610 610
   $errors = array();
611 611
   $languages = locale_language_list();
612 612
   $translation_resources = array();
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
       ),
654 654
     );
655 655
     // Be sure any strings from the override file are added to the boinc group
656
-    $override_file = './' . drupal_get_path('module', 'boinctranslate') . '/includes/other-boinc-translation-strings.txt';
656
+    $override_file = './'.drupal_get_path('module', 'boinctranslate').'/includes/other-boinc-translation-strings.txt';
657 657
     $other_strings = file($override_file);
658 658
     if ($other_strings) {
659 659
       foreach ($other_strings as $string) {
@@ -666,13 +666,13 @@  discard block
 block discarded – undo
666 666
           // Use '|' as delimiter to split string and context info.
667 667
           $line = explode("|", $string);
668 668
           if ($line) {
669
-            if (count($line)==1) {
669
+            if (count($line) == 1) {
670 670
               $tl0 = trim($line[0]);
671 671
               if ($tl0) {
672 672
                 bts($tl0);
673 673
               }
674 674
             }
675
-            elseif (count($line)>1) {
675
+            elseif (count($line) > 1) {
676 676
               $tl0 = trim($line[0]);
677 677
               $tl1 = trim($line[1]);
678 678
               if ($tl0 and $tl1) {
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
  */
742 742
 function boinctranslate_refresh_translations_op($project, $resource, $langcode, $language, $textgroups, $debug_mode, &$context) {
743 743
 
744
-  require_once(getcwd() . '/includes/locale.inc');
744
+  require_once(getcwd().'/includes/locale.inc');
745 745
 
746 746
   if ($debug_mode) {
747 747
     watchdog(
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
         $file->filename = basename($file->filepath);
773 773
         if (!$file->filepath) {
774 774
           $message = 'Unable to create temporary file in '
775
-            . file_directory_temp() . " for {$language} translation "
775
+            . file_directory_temp()." for {$language} translation "
776 776
             . "resource {$project}:{$resource}";
777 777
         }
778 778
 
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
     $context['finished'] = 1;
850 850
   }
851 851
   else {
852
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
852
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
853 853
   }
854 854
 }
855 855
 
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
     // An error occurred.
873 873
     // $operations contains the operations that remained unprocessed.
874 874
     $error_operation = reset($operations);
875
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
875
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
876 876
     watchdog(
877 877
       'boinctranslate',
878 878
       $message,
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
     @set_time_limit(240);
894 894
   }
895 895
 
896
-  require_once(getcwd() . '/includes/locale.inc');
896
+  require_once(getcwd().'/includes/locale.inc');
897 897
 
898 898
   // Check if we have the language already in the database.
899 899
   if (!db_fetch_object(db_query("SELECT language FROM {languages} WHERE language = '%s'", $langcode))) {
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
  */
936 936
 function _boinctranslate_locale_import_read_po($op, $file, $mode = NULL, $lang = NULL, $group = 'default') {
937 937
 
938
-  require_once(getcwd() . '/includes/locale.inc');
938
+  require_once(getcwd().'/includes/locale.inc');
939 939
 
940 940
   $fd = fopen($file->filepath, "rb"); // File will get closed by PHP on return
941 941
   if (!$fd) {
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
   $lineno = 0; // Current line
956 956
 
957 957
   while (!feof($fd)) {
958
-    $line = fgets($fd, 10 * 1024); // A line should not be this long
958
+    $line = fgets($fd, 10*1024); // A line should not be this long
959 959
     if ($lineno == 0) {
960 960
       // The first line might come with a UTF-8 BOM, which should be removed.
961 961
       $line = str_replace("\xEF\xBB\xBF", '', $line);
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
         _locale_import_message('The translation file %filename contains a syntax error on line %line.', $file, $lineno);
1038 1038
         return FALSE;
1039 1039
       }
1040
-      $current["msgid"] = $current["msgid"] . "\0" . $quoted;
1040
+      $current["msgid"] = $current["msgid"]."\0".$quoted;
1041 1041
       $context = "MSGID_PLURAL";
1042 1042
     }
1043 1043
     elseif (!strncmp("msgid", $line, 5)) {
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
  */
1191 1191
 function _boinctranslate_locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL, $file = NULL, $group = 'default') {
1192 1192
 
1193
-  require_once(getcwd() . '/includes/locale.inc');
1193
+  require_once(getcwd().'/includes/locale.inc');
1194 1194
 
1195 1195
   static $report = array(
1196 1196
     'additions' => 0,
@@ -1323,13 +1323,13 @@  discard block
 block discarded – undo
1323 1323
 
1324 1324
         $lid = $row['lid'];
1325 1325
         // Check of if one or more translations exist for this lid in locales_target table.
1326
-        $exists = (bool) db_result(db_query("SELECT lid FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $langcode));
1326
+        $exists = (bool)db_result(db_query("SELECT lid FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $langcode));
1327 1327
         if (!$exists) {
1328 1328
           // No translation in this language, insert translation into locales_target table.
1329 1329
           db_query("INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (%d, '%s', '%s', %d, %d)", $lid, $langcode, $translation, $plid, $plural);
1330 1330
           $report['additions']++;
1331 1331
         }
1332
-        else if ( ($mode == LOCALE_IMPORT_OVERWRITE) and (!$ignoreoverwrite) ) {
1332
+        else if (($mode == LOCALE_IMPORT_OVERWRITE) and (!$ignoreoverwrite)) {
1333 1333
           // Translation exists, only overwrite if instructed.
1334 1334
           db_query("UPDATE {locales_target} SET translation = '%s', plid = %d, plural = %d WHERE language = '%s' AND lid = %d", $translation, $plid, $plural, $langcode, $lid);
1335 1335
           $report['updates']++;
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
     // Loop over db results from locales_source table.
1346 1346
     while ($row = db_fetch_array($resource)) {
1347 1347
       $lid = $row['lid'];
1348
-      $exists = (bool) db_result(db_query("SELECT lid FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $langcode));
1348
+      $exists = (bool)db_result(db_query("SELECT lid FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $langcode));
1349 1349
       if ($exists) {
1350 1350
         // Empty translation, remove existing if instructed.
1351 1351
         db_query("DELETE FROM {locales_target} WHERE language = '%s' AND lid = %d AND plid = %d AND plural = %d", $langcode, $lid, $plid, $plural);
@@ -1403,5 +1403,5 @@  discard block
 block discarded – undo
1403 1403
  * database.
1404 1404
  */
1405 1405
 function _boinctranslate_supertrim($instr) {
1406
-  return implode("\n", array_map('trim', preg_split('/\r\n|\r|\n/', $instr) ) );
1406
+  return implode("\n", array_map('trim', preg_split('/\r\n|\r|\n/', $instr)));
1407 1407
 }
Please login to merge, or discard this patch.
html/project.sample/project.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 define("FORUM_QA_MERGED_MODE", true);
50 50
     // Set to true to merge Message boards and Q&A section
51
-define ("DISABLE_PROFILES", true);
51
+define("DISABLE_PROFILES", true);
52 52
     // enable profiles only after enabling reCAPTCHA
53 53
     // https://boinc.berkeley.edu/trac/wiki/ProtectionFromSpam
54 54
 define("USE_STOPFORUMSPAM", true);
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
     </ol>", PROJECT);
184 184
 }
185 185
 
186
-function project_workunit($wu){
186
+function project_workunit($wu) {
187 187
     // shown in the workunit page
188 188
 }
189 189
 
190
-function project_user_summary($user){
190
+function project_user_summary($user) {
191 191
     // shown in the user summary page
192 192
 }
193 193
 
194
-function project_user_page_private($user){
194
+function project_user_page_private($user) {
195 195
     // shown in the private account page
196 196
 }
197 197
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     array("name" => "Uppercase", "short_name" => "UC", "appids" => array(1, 25)),
259 259
 );
260 260
 
261
-function project_user_credit($user){
261
+function project_user_credit($user) {
262 262
     global $sub_projects;
263 263
     foreach ($sub_projects as $sp) {
264 264
         show_app_credit_user($user, $sp["name"], $sp["appids"]);
Please login to merge, or discard this patch.
html/user/edit_passwd_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 page_head(tra("Change password"));
27 27
 
28 28
 form_start(secure_url_base()."edit_passwd_action.php", "post");
29
-form_input_text(tra("New password"), "passwd", "", "password",'id="passwd"',passwd_visible_checkbox("passwd"));
29
+form_input_text(tra("New password"), "passwd", "", "password", 'id="passwd"', passwd_visible_checkbox("passwd"));
30 30
 form_submit(tra("Change password"));
31 31
 form_end();
32 32
 page_tail();
Please login to merge, or discard this patch.
html/ops/delete_user.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 die("Delete this line first\n");
29 29
 
30
-$id = (int) $argv[1];
30
+$id = (int)$argv[1];
31 31
 
32 32
 $user = BoincUser::lookup_id($id);
33 33
 if (!$user) die("no such user\n");
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/template.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
  * Adjust the rendering of the menu
82 82
  */
83 83
 function boinc_links__system_main_menu($links, $menu, $element) {
84
-  $html .= '<ul id="' . $menu['id'] . '" class="' . $menu['class'] . '">' . "\n";
84
+  $html .= '<ul id="'.$menu['id'].'" class="'.$menu['class'].'">'."\n";
85 85
   $item_count = count($links);
86 86
   $i = 1;
87 87
   foreach ($links as $key => $link) {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     if (strpos($key, 'active-trail')) $classes[] = 'active';
90 90
     if ($i == 1) $classes[] = 'first';
91 91
     if ($i == $item_count) $classes[] = 'last';
92
-    $html .= '<li class="' . implode(' ', $classes) .'">';
92
+    $html .= '<li class="'.implode(' ', $classes).'">';
93 93
     if ($link['title'] == 'Home') {
94 94
       $link['title'] = bts('Home', array(), NULL, 'boinc:menu-link');
95 95
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
       if ($link['href'] == 'dashboard') {
99 99
         $item_count = privatemsg_unread_count();
100 100
         if ($item_count) {
101
-          $link['title'] .= '</a> <a href="' . url('messages') . '" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
101
+          $link['title'] .= '</a> <a href="'.url('messages').'" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">'.$item_count.'</span></div>';
102 102
           $link['html'] = TRUE;
103 103
           $link['attributes']['class'] = 'compound';
104 104
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     if ($link['href'] == 'moderate') {
109 109
       $item_count = boincuser_moderation_queue_count();
110 110
       if ($item_count) {
111
-        $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
111
+        $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">'.$item_count.'</span></div>';
112 112
         $link['html'] = TRUE;
113 113
       }
114 114
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     $html .= '</li>';
117 117
     $i++;
118 118
   }
119
-  $html .= '</ul>' . "\n";
119
+  $html .= '</ul>'."\n";
120 120
   return $html;
121 121
 }
122 122
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     return '';
132 132
   }
133 133
   else {
134
-    return '<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li>\n";
134
+    return '<li '.($active ? 'class="active" ' : '').'>'.$link."</li>\n";
135 135
   }
136 136
 }
137 137
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
   if (empty($locality)) {
197 197
     $locality = "en";
198 198
   }
199
-  $vars['flag_path'] = base_path() . path_to_theme() . "/images/flags/{$locality}.png";
199
+  $vars['flag_path'] = base_path().path_to_theme()."/images/flags/{$locality}.png";
200 200
 
201 201
   $server_status_url = variable_get('boinc_server_status_url', '');
202 202
   if (!$server_status_url) {
@@ -218,16 +218,16 @@  discard block
 block discarded – undo
218 218
   if (arg(0) == 'search') { 
219 219
     unset($vars['title']);
220 220
   }
221
-  else if ( (arg(0)=='account') AND (is_numeric(arg(1))) AND (empty(arg(2))) ) {
221
+  else if ((arg(0) == 'account') AND (is_numeric(arg(1))) AND (empty(arg(2)))) {
222 222
     unset($vars['title']);
223 223
   }
224
-  else if ( (arg(0)=='account') AND (arg(1)=='profile') ) {
224
+  else if ((arg(0) == 'account') AND (arg(1) == 'profile')) {
225 225
     unset($vars['title']);
226 226
   }
227
-  else if ( (arg(0)=='dashboard') ) {
227
+  else if ((arg(0) == 'dashboard')) {
228 228
     unset($vars['title']);
229 229
   }
230
-  else if ( (arg(0)=='community') AND ( (arg(1)=='teams') OR (arg(1)=='stats') ) ) {
230
+  else if ((arg(0) == 'community') AND ((arg(1) == 'teams') OR (arg(1) == 'stats'))) {
231 231
     unset($vars['title']);
232 232
   }
233 233
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
               $tab = str_replace('li class="', 'li class="first ', $tab);
244 244
           }
245 245
           if ($key == $last_key) {
246
-              $tab = str_replace('li class="', 'li class="last ', $tab) . '</ul>';
246
+              $tab = str_replace('li class="', 'li class="last ', $tab).'</ul>';
247 247
           }
248 248
       }
249 249
       elseif (strpos($tab, 'li ')) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
               $tab = str_replace('li ', 'li class="first" ', $tab);
252 252
           }
253 253
           if ($key == $last_key) {
254
-              $tab = str_replace('li ', 'li class="last" ', $tab) . '</ul>';
254
+              $tab = str_replace('li ', 'li class="last" ', $tab).'</ul>';
255 255
           }
256 256
       }
257 257
   }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
   // Optionally, run node-type-specific preprocess functions, like
290 290
   // boinc_preprocess_node_page() or boinc_preprocess_node_story().
291
-  $function = __FUNCTION__ . '_' . $vars['node']->type;
291
+  $function = __FUNCTION__.'_'.$vars['node']->type;
292 292
   if (function_exists($function)) {
293 293
     $function($vars, $hook);
294 294
   }
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
   $vars['node']->comment = 0;
340 340
   
341 341
   $vars['first_page'] = (!isset($_GET['page']) OR ($_GET['page'] < 1));
342
-  $page_count = max(ceil($vars['comment_count'] / $comments_per_page), 1);
342
+  $page_count = max(ceil($vars['comment_count']/$comments_per_page), 1);
343 343
   $vars['last_page'] = ($page_count == 1 OR ($page_count > 1 AND $_GET['page'] == $page_count - 1));
344 344
 
345 345
   $links = $vars['links'];
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
   case 'boinc_host':
452 452
       $view = views_get_current_view();
453 453
       if (!($view->result)) {
454
-        $vars['footer'] = '<h3>' . bts ('Host not found in database.', array(), NULL, 'boinc:host-details') . '</h3>';
454
+        $vars['footer'] = '<h3>'.bts('Host not found in database.', array(), NULL, 'boinc:host-details').'</h3>';
455 455
       }
456 456
     break;
457 457
   case 'boinc_host_list':
@@ -470,10 +470,10 @@  discard block
 block discarded – undo
470 470
 
471 471
     if ($result) {
472 472
       // Display the stderr output in the footer
473
-      $vars['footer'] = '<h3>' . bts('Stderr output', array(), NULL, 'boinc:task-details-errorlog') .'</h3>';
474
-      $vars['footer'] .= '<pre>' . htmlspecialchars($result->result_stderr_out) . '</pre>';
473
+      $vars['footer'] = '<h3>'.bts('Stderr output', array(), NULL, 'boinc:task-details-errorlog').'</h3>';
474
+      $vars['footer'] .= '<pre>'.htmlspecialchars($result->result_stderr_out).'</pre>';
475 475
     } else {
476
-      $vars['footer'] = '<h3>' . bts ('Task not found in database.', array(), NULL, 'boinc:task-details') . '</h3>';
476
+      $vars['footer'] = '<h3>'.bts('Task not found in database.', array(), NULL, 'boinc:task-details').'</h3>';
477 477
     }
478 478
     break;
479 479
   case 'boinc_teams':
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
     ob_start();
487 487
     // Get the workunit ID from the URL
488 488
     $result_id = arg(1);
489
-    require_boinc(array('util','boinc_db'));
489
+    require_boinc(array('util', 'boinc_db'));
490 490
     $wu = BoincWorkunit::lookup_id($result_id);
491 491
     if ($wu) {
492 492
       // Output from admin defined BOINC project-specific function
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
       // Output of project_workunit() gets caught in the buffer
495 495
       $vars['footer'] = ob_get_clean();
496 496
     } else {
497
-      $vars['footer'] = '<h3>' . bts ('Workunit not found in database.', array(), NULL, 'boinc:workunit-details') . '</h3>';
497
+      $vars['footer'] = '<h3>'.bts('Workunit not found in database.', array(), NULL, 'boinc:workunit-details').'</h3>';
498 498
     }
499 499
   default:
500 500
   }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
       $author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
517 517
     }
518 518
     elseif (is_string($user_image)) {
519
-      $author_picture .= '<img src="' . $user_image . '"/>';
519
+      $author_picture .= '<img src="'.$user_image.'"/>';
520 520
     }
521 521
   }
522 522
   $author_picture .= '</div>';
@@ -555,14 +555,14 @@  discard block
 block discarded – undo
555 555
   case 'profile':
556 556
   case 'user':
557 557
     $node = $variables['result']['node'];
558
-    $variables['url'] = url('account/' . $node->is_uid);
558
+    $variables['url'] = url('account/'.$node->is_uid);
559 559
     $variables['title'] = $node->tos_name;
560 560
     $variables['user_image'] = boincuser_get_user_profile_image($node->is_uid);
561 561
     $variables['account'] = user_load($node->is_uid);
562 562
     break;
563 563
   case 'team':
564 564
     $node = $variables['result']['node'];
565
-    $variables['url'] = url('/community/teams/' . $node->entity_id);;
565
+    $variables['url'] = url('/community/teams/'.$node->entity_id); ;
566 566
     break;
567 567
   case 'forum':
568 568
     $node = $variables['result']['node'];
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
     // Parent forum topic title
581 581
     $variables['parent_title'] = $drupalnode->title;
582 582
     // Link to the parent forum topic
583
-    $variables['parent_topic'] = l($drupalnode->title, drupal_get_path_alias('node/' . $nid) );
583
+    $variables['parent_topic'] = l($drupalnode->title, drupal_get_path_alias('node/'.$nid));
584 584
     // Get the taxonomy for the node, creates a link to the parent forum
585 585
     $taxonomy = reset($drupalnode->taxonomy);
586 586
     if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) {
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
   if (!arg(2)) {
599 599
     $message = '';
600 600
   }
601
-  return '<p>' . $message . '</p>';
601
+  return '<p>'.$message.'</p>';
602 602
 }
603 603
 
604 604
 /**
@@ -614,11 +614,11 @@  discard block
 block discarded – undo
614 614
     
615 615
     // Shorten the name when it is too long or it will break many tables.
616 616
     if (drupal_strlen($name) > 20) {
617
-      $name = drupal_substr($name, 0, 15) . '...';
617
+      $name = drupal_substr($name, 0, 15).'...';
618 618
     }
619 619
 
620 620
     if (user_access('access user profiles')) {
621
-      $output = l($name, 'account/' . $object->uid, array('attributes' => array('title' => bts('View user profile.', array(), NULL, 'boinc:users-table'))));
621
+      $output = l($name, 'account/'.$object->uid, array('attributes' => array('title' => bts('View user profile.', array(), NULL, 'boinc:users-table'))));
622 622
     }
623 623
     else {
624 624
       $output = check_plain($name);
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
       $output = check_plain($object->name);
637 637
     }
638 638
 
639
-    $output .= ' (' . bts('not verified', array(), NULL, 'boinc:user-not-found') . ')';
639
+    $output .= ' ('.bts('not verified', array(), NULL, 'boinc:user-not-found').')';
640 640
   }
641 641
   else {
642 642
     $output = check_plain(variable_get('anonymous', bts('Anonymous', array(), NULL, 'boinc:anonymous-user')));
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
  * Remove the link under text areas that reads:
650 650
  * "More information about formatting options"
651 651
  */
652
-function boinc_filter_tips_more_info () {
652
+function boinc_filter_tips_more_info() {
653 653
   return '';
654 654
 }
655 655
 
@@ -691,8 +691,8 @@  discard block
 block discarded – undo
691 691
 The !site team', array(
692 692
         '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
693 693
         '!site' => variable_get('site_name', 'Drupal-BOINC'),
694
-        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
695
-        '!link' => url('account/'. $sender->uid, array('absolute' => TRUE)),
694
+        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message').': '.$flag->friend_message : '',
695
+        '!link' => url('account/'.$sender->uid, array('absolute' => TRUE)),
696 696
         ), array(), NULL, 'boinc:friend-request-email');
697 697
       break;
698 698
 
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 The !site team', array(
711 711
         '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
712 712
         '!site' => variable_get('site_name', 'Drupal-BOINC'),
713
-        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
713
+        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message').': '.$flag->friend_message : '',
714 714
         '!link' => url('goto/friend-requests', array('absolute' => TRUE)),
715 715
         ),
716 716
       array(), NULL, 'boinc:friend-request-email');
@@ -723,13 +723,13 @@  discard block
 block discarded – undo
723 723
  * Edit action links
724 724
  */
725 725
 function phptemplate_links($links, $attributes = array('class' => 'links')) {
726
-  if ($links){
726
+  if ($links) {
727 727
     // Remove flag-subscriptions link. It will be placed elsewhere.
728 728
     if (isset($links['flag-subscriptions'])) {
729 729
       unset($links['flag-subscriptions']);
730 730
     }
731 731
     // Reorder the links however you need them.
732
-    $links = reorder_links($links, array('comment_edit','quote','comment_add','comment_reply','flag-abuse_comment','flag-abuse_node'), array('comment_delete'));
732
+    $links = reorder_links($links, array('comment_edit', 'quote', 'comment_add', 'comment_reply', 'flag-abuse_comment', 'flag-abuse_node'), array('comment_delete'));
733 733
     // Use the built-in theme_links() function to format the $links array.
734 734
     return theme_links($links, $attributes);
735 735
   }
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
   // are the class attribute for the <li> tags.
813 813
   $dom = new DOMDocument;
814 814
   $dom->loadHTML(mb_convert_encoding($links, 'HTML-ENTITIES', 'UTF-8'));
815
-  foreach($dom->getElementsByTagName('li') as $node) {
815
+  foreach ($dom->getElementsByTagName('li') as $node) {
816 816
     $key = $node->getAttribute("class");
817 817
     $alllinks[$key] = $dom->saveHTML($node);
818 818
   }
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
     "hide", "unhide",
826 826
     "comment_delete",
827 827
   );
828
-  foreach(array_keys($alllinks) as $key1) {
828
+  foreach (array_keys($alllinks) as $key1) {
829 829
     // Select string up to first space, if present.
830 830
     $class1 = strtok($key1, ' ');
831 831
     if (in_array($class1, $selected_classes)) {
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
     $dom->loadHTML(mb_convert_encoding($alink, 'HTML-ENTITIES', 'UTF-8'));
855 855
 
856 856
     $myli = $dom->getElementsByTagName('li');
857
-    if ($myli->length>0) {
857
+    if ($myli->length > 0) {
858 858
       $newclasses = trim(($myli[0]->getAttribute("class"))." first");
859 859
       $myli[0]->setAttribute("class", $newclasses);
860 860
       $alink = $dom->saveHTML($myli[0]);
@@ -871,13 +871,13 @@  discard block
 block discarded – undo
871 871
 
872 872
   $output = '<ul class="menu"><li class="first">';
873 873
   if ($user->uid) {
874
-    $output .= '<a href="' . url('logout') . '">' . bts('Logout', array(), NULL, 'boinc:menu-link') . '</a>';
874
+    $output .= '<a href="'.url('logout').'">'.bts('Logout', array(), NULL, 'boinc:menu-link').'</a>';
875 875
   } else {
876
-    $output .= '<a href="' . url('user/login', array('query' => drupal_get_destination()) ) . '">' . bts('Login', array(), NULL, 'boinc:menu-link') . '</a>';
876
+    $output .= '<a href="'.url('user/login', array('query' => drupal_get_destination())).'">'.bts('Login', array(), NULL, 'boinc:menu-link').'</a>';
877 877
   }
878 878
   $output .= '</li>';
879 879
   if (module_exists('global_search') OR module_exists('global_search_solr')) {
880
-    $output .= '<li class="last"> <a class="search" href="' . url('search/site') . '">' . bts('search', array(), NULL, 'boinc:menu-link') .'</a> </l1>';
880
+    $output .= '<li class="last"> <a class="search" href="'.url('search/site').'">'.bts('search', array(), NULL, 'boinc:menu-link').'</a> </l1>';
881 881
   }
882 882
   $output .= '</ul>';
883 883
   return $output;
@@ -904,8 +904,8 @@  discard block
 block discarded – undo
904 904
     if ($ignored[$object->uid] == 0) {
905 905
       $links['ignore_user'] = array(
906 906
         'title' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
907
-        'href' => 'account/prefs/privacy/ignore_user/add/'. $object->uid,
908
-        'query' => 'destination='. $_GET['q'],
907
+        'href' => 'account/prefs/privacy/ignore_user/add/'.$object->uid,
908
+        'query' => 'destination='.$_GET['q'],
909 909
         'attributes' => array(
910 910
           'class' => 'ignore-user',
911 911
           'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
@@ -920,8 +920,8 @@  discard block
 block discarded – undo
920 920
     if ($ignored[$object->uid] == 0) {
921 921
       $links['ignore_user'] = array(
922 922
         'title' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
923
-        'href' => 'account/prefs/privacy/ignore_user/add/'. $object->uid,
924
-        'query' => 'destination='. $_GET['q'],
923
+        'href' => 'account/prefs/privacy/ignore_user/add/'.$object->uid,
924
+        'query' => 'destination='.$_GET['q'],
925 925
         'attributes' => array(
926 926
           'class' => 'ignore-user',
927 927
           'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
Please login to merge, or discard this patch.
html/inc/password_compat/password.inc 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
                 return null;
39 39
             }
40 40
             if (is_null($password) || is_int($password)) {
41
-                $password = (string) $password;
41
+                $password = (string)$password;
42 42
             }
43 43
             if (!is_string($password)) {
44 44
                 trigger_error("password_hash(): Password must be a string", E_USER_WARNING);
45 45
                 return null;
46 46
             }
47 47
             if (!is_int($algo)) {
48
-                trigger_error("password_hash() expects parameter 2 to be long, " . gettype($algo) . " given", E_USER_WARNING);
48
+                trigger_error("password_hash() expects parameter 2 to be long, ".gettype($algo)." given", E_USER_WARNING);
49 49
                 return null;
50 50
             }
51 51
             $resultLength = 0;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 case PASSWORD_BCRYPT:
54 54
                     $cost = PASSWORD_BCRYPT_DEFAULT_COST;
55 55
                     if (isset($options['cost'])) {
56
-                        $cost = (int) $options['cost'];
56
+                        $cost = (int)$options['cost'];
57 57
                         if ($cost < 4 || $cost > 31) {
58 58
                             trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING);
59 59
                             return null;
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
                     case 'integer':
80 80
                     case 'double':
81 81
                     case 'string':
82
-                        $salt = (string) $options['salt'];
82
+                        $salt = (string)$options['salt'];
83 83
                         break;
84 84
                     case 'object':
85 85
                         if (method_exists($options['salt'], '__tostring')) {
86
-                            $salt = (string) $options['salt'];
86
+                            $salt = (string)$options['salt'];
87 87
                             break;
88 88
                         }
89 89
                     case 'array':
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
                     if ($read >= $raw_salt_len) {
127 127
                         $buffer_valid = true;
128 128
                     }
129
-                    $buffer = str_pad($buffer, $raw_salt_len, "\0") ^ str_pad($local_buffer, $raw_salt_len, "\0");
129
+                    $buffer = str_pad($buffer, $raw_salt_len, "\0")^str_pad($local_buffer, $raw_salt_len, "\0");
130 130
                 }
131 131
                 if (!$buffer_valid || PasswordCompat\binary\_strlen($buffer) < $raw_salt_len) {
132 132
                     $buffer_length = PasswordCompat\binary\_strlen($buffer);
133 133
                     for ($i = 0; $i < $raw_salt_len; $i++) {
134 134
                         if ($i < $buffer_length) {
135
-                            $buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255));
135
+                            $buffer[$i] = $buffer[$i]^chr(mt_rand(0, 255));
136 136
                         } else {
137 137
                             $buffer .= chr(mt_rand(0, 255));
138 138
                         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             }
154 154
             $salt = PasswordCompat\binary\_substr($salt, 0, $required_salt_len);
155 155
 
156
-            $hash = $hash_format . $salt;
156
+            $hash = $hash_format.$salt;
157 157
 
158 158
             $ret = crypt($password, $hash);
159 159
 
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
          */
209 209
         function password_needs_rehash($hash, $algo, array $options = array()) {
210 210
             $info = password_get_info($hash);
211
-            if ($info['algo'] !== (int) $algo) {
211
+            if ($info['algo'] !== (int)$algo) {
212 212
                 return true;
213 213
             }
214 214
             switch ($algo) {
215 215
                 case PASSWORD_BCRYPT:
216
-                    $cost = isset($options['cost']) ? (int) $options['cost'] : PASSWORD_BCRYPT_DEFAULT_COST;
216
+                    $cost = isset($options['cost']) ? (int)$options['cost'] : PASSWORD_BCRYPT_DEFAULT_COST;
217 217
                     if ($cost !== $info['options']['cost']) {
218 218
                         return true;
219 219
                     }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 
243 243
             $status = 0;
244 244
             for ($i = 0; $i < PasswordCompat\binary\_strlen($ret); $i++) {
245
-                $status |= (ord($ret[$i]) ^ ord($hash[$i]));
245
+                $status |= (ord($ret[$i])^ord($hash[$i]));
246 246
             }
247 247
 
248 248
             return $status === 0;
Please login to merge, or discard this patch.
html/inc/random_compat/random_bytes_libsodium_legacy.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,10 +70,10 @@
 block discarded – undo
70 70
                 $n = ($bytes - $i) > 1073741824
71 71
                     ? 1073741824
72 72
                     : $bytes - $i;
73
-                $buf .= Sodium::randombytes_buf((int) $n);
73
+                $buf .= Sodium::randombytes_buf((int)$n);
74 74
             }
75 75
         } else {
76
-            $buf .= Sodium::randombytes_buf((int) $bytes);
76
+            $buf .= Sodium::randombytes_buf((int)$bytes);
77 77
         }
78 78
 
79 79
         if (is_string($buf)) {
Please login to merge, or discard this patch.
html/inc/random_compat/random_bytes_dev_urandom.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $fp = fopen('/dev/urandom', 'rb');
59 59
             if (!empty($fp)) {
60 60
                 $st = fstat($fp);
61
-                if (($st['mode'] & 0170000) !== 020000) {
61
+                if (($st['mode']&0170000) !== 020000) {
62 62
                     fclose($fp);
63 63
                     $fp = false;
64 64
                 }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                 /**
142 142
                  * @var string|bool
143 143
                  */
144
-                $buf = $buf . $read;
144
+                $buf = $buf.$read;
145 145
             } while ($remaining > 0);
146 146
 
147 147
             /**
Please login to merge, or discard this patch.