Passed
Push — master ( 12087f...cda639 )
by Struan
06:52 queued 41s
created
www/includes/utility.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     if ($debug_level != '') {
30 30
 
31 31
         // Set which level shows which types of debug info.
32
-        $levels =  [
32
+        $levels = [
33 33
             1 =>  ['THEUSER', 'TIME', 'SQLERROR', 'PAGE', 'TEMPLATE', 'SEARCH', 'ALERTS', 'MP'],
34 34
             2 =>  ['SQL', 'EMAIL', 'WIKIPEDIA', 'hansardlist', 'debatelist', 'wranslist', 'whalllist'],
35 35
             3 =>  ['SQLRESULT'],
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     // consider are E_WARNING, E_NOTICE, E_USER_ERROR,
79 79
     // E_USER_WARNING and E_USER_NOTICE
80 80
     # Commented out are ones that a user function cannot handle.
81
-    $errortype =  [
81
+    $errortype = [
82 82
         #E_ERROR            => "Error",
83 83
         E_WARNING           => "Warning",
84 84
         #E_PARSE            => "Parsing Error",
@@ -355,14 +355,14 @@  discard block
 block discarded – undo
355 355
     $in_seconds = strtotime($datetime);
356 356
     $now = time();
357 357
 
358
-    $diff   =  $now - $in_seconds;
359
-    $months =  floor($diff / 2419200);
358
+    $diff   = $now - $in_seconds;
359
+    $months = floor($diff / 2419200);
360 360
     $diff   -= $months * 2419200;
361
-    $weeks  =  floor($diff / 604800);
361
+    $weeks  = floor($diff / 604800);
362 362
     $diff   -= $weeks * 604800;
363
-    $days   =  floor($diff / 86400);
363
+    $days   = floor($diff / 86400);
364 364
     $diff   -= $days * 86400;
365
-    $hours  =  floor($diff / 3600);
365
+    $hours  = floor($diff / 3600);
366 366
     $diff   -= $hours * 3600;
367 367
     $minutes = floor($diff / 60);
368 368
     $diff   -= $minutes * 60;
@@ -497,11 +497,11 @@  discard block
 block discarded – undo
497 497
 
498 498
     if ($filter_type == 'strict') {
499 499
         // No tags allowed at all!
500
-        $filter->allowed =  [];
500
+        $filter->allowed = [];
501 501
     } else {
502 502
         // Comment.
503 503
         // Only allowing <a href>, <b>, <strong>, <i> and <em>
504
-        $filter->allowed =  [
504
+        $filter->allowed = [
505 505
             'a' => ['href'],
506 506
             'strong' => [],
507 507
             'em' => [],
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
     $text = preg_replace('(href="[^"]*")', '$0 rel="nofollow"', $text);
529 529
     $text = preg_replace_callback(
530 530
         '/(rel="nofollow">)(http[^<]{60,})</',
531
-        function ($matches) {
531
+        function($matches) {
532 532
             return $matches[1] . substr($matches[2], 0, 60) . '...<';
533 533
         },
534 534
         $text
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
 function entities_to_numbers($string) {
892 892
     $string = str_replace(
893 893
         ['&Ouml;', '&acirc;', '&uacute;', '&aacute;', '&iacute;', '&ocirc;', '&eacute;'],
894
-        ['&#214;', '&#226;',  '&#250;',   '&#225;',   '&#237;',   '&#244;',  '&#233;'  ],
894
+        ['&#214;', '&#226;', '&#250;', '&#225;', '&#237;', '&#244;', '&#233;'],
895 895
         $string
896 896
     );
897 897
     return $string;
@@ -908,9 +908,9 @@  discard block
 block discarded – undo
908 908
         }
909 909
     }
910 910
 
911
-    $s   = [' ', '&amp;', '&ocirc;',  '&Ouml;',  '&ouml;',   '&acirc;',  '&iacute;', '&aacute;', '&uacute;', '&eacute;', '&oacute;', '&Oacute;'];
912
-    $s2  = [" ", "&",     "\xc3\xb4", "\xc3\96", "\xc3\xb6", "\xc3\xa5", "\xc3\xad", "\xc3\xa1", "\xc3\xba", "\xc3\xa9", "\xc3\xb3", "\xc3\x93"];
913
-    $r   = ['_', 'and',   'o',        'o',       'o',        'a',        'i',        'a',        'u',        'e',        'o',        'o'];
911
+    $s   = [' ', '&amp;', '&ocirc;', '&Ouml;', '&ouml;', '&acirc;', '&iacute;', '&aacute;', '&uacute;', '&eacute;', '&oacute;', '&Oacute;'];
912
+    $s2  = [" ", "&", "\xc3\xb4", "\xc3\96", "\xc3\xb6", "\xc3\xa5", "\xc3\xad", "\xc3\xa1", "\xc3\xba", "\xc3\xa9", "\xc3\xb3", "\xc3\x93"];
913
+    $r   = ['_', 'and', 'o', 'o', 'o', 'a', 'i', 'a', 'u', 'e', 'o', 'o'];
914 914
     $name = preg_replace('#^the #', '', strtolower($name));
915 915
 
916 916
     $out = '';
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
                 }
1090 1090
                 $out .= '<li>' . $body . '<ul>';
1091 1091
             } else {
1092
-                $LISTURL->insert([ 'id' => $gid ]);
1092
+                $LISTURL->insert(['id' => $gid]);
1093 1093
                 $out .= '<li><a href="' . $LISTURL->generate() . '">';
1094 1094
                 $out .= $body . '</a>';
1095 1095
             }
Please login to merge, or discard this patch.