Passed
Pull Request — development (#390)
by Mirko
09:05
created
htdocs/lib2/logic/cache.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
                 if (!$newcoord) {
522 522
                     $newcoord = $coords[$coordpos];
523 523
                 }
524
-                ++ $coordpos;
524
+                ++$coordpos;
525 525
             }
526 526
             if ($newcoord) {
527 527
                 $distance = geomath::calcDistance(
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
             $original = count($coords) - 1;
555 555
             $lastlogdate = $logs[count($logs) - 1]['order_date'];
556 556
             while ($original > 0 && $coords[$original - 1]['date'] < $lastlogdate) {
557
-                -- $original;
557
+                --$original;
558 558
             }
559 559
             $coord = new coordinate($coords[$original]['latitude'], $coords[$original]['longitude']);
560 560
             $logs[] = [
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
             $logTypes[$i]['selected'] = ($logtype == $defaultLogType) ? true : false;
956 956
             $logTypes[$i]['name'] = $logtypeNames[$logtype];
957 957
             $logTypes[$i]['id'] = $logtype;
958
-            $i ++;
958
+            $i++;
959 959
         }
960 960
 
961 961
         // return
Please login to merge, or discard this patch.
htdocs/lib2/logic/cracklib.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     // min. 4 different chars
36 36
     $chars = array();
37
-    for ($i = 0; $i < mb_strlen($pw); $i ++) {
37
+    for ($i = 0; $i < mb_strlen($pw); $i++) {
38 38
         $chars[mb_substr($pw, $i, 1)] = true;
39 39
     }
40 40
 
Please login to merge, or discard this patch.
htdocs/lib2/RSSParser.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                                     'description' => $item->description
67 67
                                 );
68 68
                                 // increment counter
69
-                                $i ++;
69
+                                $i++;
70 70
                                 // htmlspecialchars_decode() works around inconsistent HTML encoding
71 71
                                 // e.g. in SMF Forum Threads
72 72
                             } elseif (!in_array(htmlspecialchars_decode($item->title), $headlines) &&
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                                 );
81 81
                                 $headlines[] = "" . htmlspecialchars_decode($item->title);
82 82
                                 // increment counter
83
-                                $i ++;
83
+                                $i++;
84 84
                             }
85 85
                         }
86 86
                     }
Please login to merge, or discard this patch.
htdocs/lib2/translate.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function t($message, $style, $resource_name, $line, $plural = '', $count = 1, $lang = null)
34 34
     {
35
-        global $opt, $locale;    // $locale is for lib1 compatibility
35
+        global $opt, $locale; // $locale is for lib1 compatibility
36 36
 
37 37
         if ($message == '') {
38 38
             return '';
Please login to merge, or discard this patch.
htdocs/lib2/errorhandler.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     $errorlog_dir = $opt['rootpath'] . 'var/errorlog';
113 113
     $errorlog_path = $errorlog_dir . "/errorlog-" . date("Y-m-d");
114 114
 
115
-    $error_mail_limit = 32768;    // send max 32 KB = ca. 5-20 errors per day/logfile
115
+    $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile
116 116
 
117 117
     // All errors which may happen here are ignored, to avoid error recursions.
118 118
 
Please login to merge, or discard this patch.
htdocs/lib2/OcSmarty.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public $main_template = 'sys_main';
18 18
     public $bench = null;
19 19
     public $compile_id = null;
20
-    public $cache_id = null;    // This is a smarty caching ID, not a caches.cache_id.
20
+    public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id.
21 21
     public $title = '';
22 22
     public $menuitem = null;
23 23
     public $nowpsearch = false;
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 
386 386
         $args = func_get_args();
387 387
         unset($args[0]);
388
-        for ($i = 1; isset($args[$i]); $i ++) {
388
+        for ($i = 1; isset($args[$i]); $i++) {
389 389
             $this->assign('p' . $i, $args[$i]);
390 390
         }
391 391
 
Please login to merge, or discard this patch.
htdocs/lib2/search/search.gpx.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                 $thislog = mb_ereg_replace('{username}', text_xmlentities($rLog['username']), $thislog);
391 391
 
392 392
                 if ($rLog['type'] == 3 && $rLog['needs_maintenance'] == 2) {
393
-                    $logtype = 'Needs Maintenance';   // with capital M, other than cache attribute
393
+                    $logtype = 'Needs Maintenance'; // with capital M, other than cache attribute
394 394
                 } elseif (isset($gpxLogType[$rLog['type']])) {
395 395
                     $logtype = $gpxLogType[$rLog['type']];
396 396
                 } else {
@@ -511,28 +511,28 @@  discard block
 block discarded – undo
511 511
             switch ($childWaypoint['type']) {
512 512
                 case 1:
513 513
                     $wp_typename = "Parking Area";
514
-                    break;  // well-known garmin symbols
514
+                    break; // well-known garmin symbols
515 515
                 case 2:
516 516
                     $wp_typename = "Flag, Green";
517
-                    break;   // stage / ref point
517
+                    break; // stage / ref point
518 518
                 case 3:
519 519
                     $wp_typename = "Flag, Blue";
520
-                    break;    // path
520
+                    break; // path
521 521
                 case 4:
522 522
                     $wp_typename = "Circle with X";
523 523
                     break; // final
524 524
                 case 5:
525 525
                     $wp_typename = "Diamond, Green";
526
-                    break;  // point of interest
526
+                    break; // point of interest
527 527
                 default:
528 528
                     $wp_typename = "Flag, Blue";
529
-                    break;  // for the case new types are forgotten here ..
529
+                    break; // for the case new types are forgotten here ..
530 530
             }
531 531
             $thiswp = mb_ereg_replace('{type}', text_xmlentities($wp_typename), $thiswp);
532 532
             $thiswp = mb_ereg_replace('{parent}', $r['waypoint'], $thiswp);
533 533
             $thiswp = mb_ereg_replace('{cacheid}', $r['cacheid'], $thiswp);
534 534
             $waypoints .= $thiswp;
535
-            ++ $n;
535
+            ++$n;
536 536
         }
537 537
 
538 538
         if ($cacheNote && !empty($cacheNote['latitude']) && !empty($cacheNote['longitude'])) {
Please login to merge, or discard this patch.
htdocs/lib2/search/search.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
     }
157 157
 
158 158
     // doppelte chars ersetzen
159
-    for ($c = ord('a'); $c <= ord('z'); $c ++) {
159
+    for ($c = ord('a'); $c <= ord('z'); $c++) {
160 160
         $str = mb_ereg_replace(chr($c) . chr($c), chr($c), $str);
161 161
     }
162 162
 
Please login to merge, or discard this patch.
htdocs/lib2/error.inc.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@
 block discarded – undo
7 7
  *  Common error messages
8 8
  ***************************************************************************/
9 9
 
10
- define('ERROR_UNKNOWN', 1000);
11
- define('ERROR_TEMPLATE_NOT_FOUND', 1001);
12
- define('ERROR_COMPILATION_FAILED', 1002);
13
- define('ERROR_NO_ACCESS', 1003);
14
- define('ERROR_INVALID_OPERATION', 1004);
15
- define('ERROR_LOGIN_REQUIRED', 1005);
16
- define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
17
- define('ERROR_NO_COOKIES', 1007);
18
- define('ERROR_ALREADY_LOGGEDIN', 1008);
19
- define('ERROR_USER_NOT_ACTIVE', 1009);
20
- define('ERROR_USER_NO_EMAIL', 1010);
21
- define('ERROR_CACHE_NOT_PUBLISHED', 1011);
22
- define('ERROR_CACHE_LOCKED', 1012);
10
+    define('ERROR_UNKNOWN', 1000);
11
+    define('ERROR_TEMPLATE_NOT_FOUND', 1001);
12
+    define('ERROR_COMPILATION_FAILED', 1002);
13
+    define('ERROR_NO_ACCESS', 1003);
14
+    define('ERROR_INVALID_OPERATION', 1004);
15
+    define('ERROR_LOGIN_REQUIRED', 1005);
16
+    define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
17
+    define('ERROR_NO_COOKIES', 1007);
18
+    define('ERROR_ALREADY_LOGGEDIN', 1008);
19
+    define('ERROR_USER_NOT_ACTIVE', 1009);
20
+    define('ERROR_USER_NO_EMAIL', 1010);
21
+    define('ERROR_CACHE_NOT_PUBLISHED', 1011);
22
+    define('ERROR_CACHE_LOCKED', 1012);
23 23
 
24
- define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
25
- define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
26
- define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
24
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
25
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
26
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
27 27
  
28
- define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
29
- define('ERROR_DB_NO_ROOT', 1017);
28
+    define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
29
+    define('ERROR_DB_NO_ROOT', 1017);
30 30
 
31
- define('ERROR_USER_NOT_EXISTS', 1018);
32
- define('ERROR_CACHE_NOT_EXISTS', 1019);
33
- define('ERROR_CACHELOG_NOT_EXISTS', 1020);
34
- define('ERROR_PICTURE_NOT_EXISTS', 1021);
31
+    define('ERROR_USER_NOT_EXISTS', 1018);
32
+    define('ERROR_CACHE_NOT_EXISTS', 1019);
33
+    define('ERROR_CACHELOG_NOT_EXISTS', 1020);
34
+    define('ERROR_PICTURE_NOT_EXISTS', 1021);
35 35
 
36
- define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
37
- define('ERROR_UPLOAD_ERR_SIZE', 1023);
38
- define('ERROR_UPLOAD_ERR_TYPE', 1024);
39
- define('ERROR_UPLOAD_UNKNOWN', 1025);
40
- define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
36
+    define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
37
+    define('ERROR_UPLOAD_ERR_SIZE', 1023);
38
+    define('ERROR_UPLOAD_ERR_TYPE', 1024);
39
+    define('ERROR_UPLOAD_UNKNOWN', 1025);
40
+    define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
Please login to merge, or discard this patch.