Passed
Push — development ( 9f1fbc...c66aa5 )
by Mirco
22:08 queued 14:06
created
htdocs/lib2/logic/logtypes.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -91,28 +91,28 @@  discard block
 block discarded – undo
91 91
 
92 92
     $allowed_logtypes = array();
93 93
     if ($owner || $admin_report || $admin_locked) {
94
-        $allowed_logtypes[] = 3;   // note
94
+        $allowed_logtypes[] = 3; // note
95 95
     }
96 96
     if (($owner && $statuslogs) || $admin_report) {
97 97
         if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) {
98
-            $allowed_logtypes[] = 10;  // ready for search
99
-            $allowed_logtypes[] = 11;  // temporarily not available
100
-            $allowed_logtypes[] = 9;   // archived
101
-            $allowed_logtypes[] = 13;  // locked
98
+            $allowed_logtypes[] = 10; // ready for search
99
+            $allowed_logtypes[] = 11; // temporarily not available
100
+            $allowed_logtypes[] = 9; // archived
101
+            $allowed_logtypes[] = 13; // locked
102 102
         }
103 103
         if ($admin_report || $old_logtype == 14) {
104 104
             $allowed_logtypes[] = 14;
105 105
         }  // locked, invisible
106 106
     }
107 107
     if ($cache_type == 6) { // event
108
-        $allowed_logtypes[] = 8;   // will attend
109
-        $allowed_logtypes[] = 7;   // attended
108
+        $allowed_logtypes[] = 8; // will attend
109
+        $allowed_logtypes[] = 7; // attended
110 110
     } else {
111
-        $allowed_logtypes[] = 1;   // found
112
-        $allowed_logtypes[] = 2;   // not found
111
+        $allowed_logtypes[] = 1; // found
112
+        $allowed_logtypes[] = 2; // not found
113 113
     }
114 114
     if (!($owner || $admin_report || $admin_locked)) {
115
-        $allowed_logtypes[] = 3;   // note
115
+        $allowed_logtypes[] = 3; // note
116 116
     }
117 117
 
118 118
     // always allow to keep the existing logtype when the log is edited by an admin
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             } elseif (!$opt['logic']['admin']['team_comments_only_for_reports'] || admin_has_open_report($cache_id)) {
152 152
                 // allowed for report processing by admins
153 153
                 $allowed = true;
154
-            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6,7])) {
154
+            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6, 7])) {
155 155
                 // allowed for admins && locked caches, see http://forum.opencaching.de/index.php?topic=3102.msg39517#msg39517
156 156
                 $allowed = true;
157 157
             } else {
Please login to merge, or discard this patch.
htdocs/lib2/logic/cacheIcon.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname)
12 12
     {
13
-        $iconname = mb_eregi_replace("cache/", "", $iconname);   // for old cache_type table contents
13
+        $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents
14 14
         $iconext = "." . mb_eregi_replace("^.*\.", "", $iconname);
15 15
         $iconname = mb_eregi_replace("\..*", "", $iconname);
16 16
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 break;
31 31
             case 5:
32 32
                 $iconname .= "-s";
33
-                break;      // fix for RT ticket #3403
33
+                break; // fix for RT ticket #3403
34 34
             case 6:
35 35
                 $iconname .= "-a";
36 36
                 break;
Please login to merge, or discard this patch.
htdocs/lib2/logic/picture.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -435,9 +435,9 @@
 block discarded – undo
435 435
                 return false;
436 436
             } else {
437 437
                 // restore picture file
438
-                $this->setUrl($original_url);        // set the url, so that we can
439
-                $filename = $this->getFilename();    // .. retreive the file path+name
440
-                $this->setFilenames($filename);      // now set url(s) from the new uuid
438
+                $this->setUrl($original_url); // set the url, so that we can
439
+                $filename = $this->getFilename(); // .. retreive the file path+name
440
+                $this->setFilenames($filename); // now set url(s) from the new uuid
441 441
                 @rename($this->deleted_filename($filename), $this->getFilename());
442 442
             }
443 443
         }
Please login to merge, or discard this patch.
htdocs/lib2/logic/cachelog.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@
 block discarded – undo
355 355
         //     return array();
356 356
         // Logic Error - log types are still valid when no NEW logs are allowed for the cache.
357 357
         // (Would e.g. block admin logs and log-type restoring for locked caches.)
358
-        return get_cache_log_types($this->getCacheId(), $this->getType());  // depends on userid
358
+        return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid
359 359
     }
360 360
 
361 361
     public static function isDuplicate($cacheId, $userId, $logType, $logDate, $logText)
Please login to merge, or discard this patch.
htdocs/lib2/logic/gis.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         // number of points in the polygon
30 30
         $n = count($polygon);
31 31
         $poly1 = $polygon[0];
32
-        for ($i = 1; $i <= $n; $i ++) {
32
+        for ($i = 1; $i <= $n; $i++) {
33 33
             $poly1XY = explode(' ', $poly1);
34 34
             $poly1x = $poly1XY[0];
35 35
             $poly1y = $poly1XY[1];
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                         if ($poly1y != $poly2y) {
45 45
                             $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x;
46 46
                             if ($poly1x == $poly2x || $px <= $xinters) {
47
-                                $counter ++;
47
+                                $counter++;
48 48
                             }
49 49
                         }
50 50
                     }
Please login to merge, or discard this patch.
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 2 patches
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.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@
 block discarded – undo
159 159
     }
160 160
 
161 161
     /**
162
-     * @param $message
163
-     * @param $style
164
-     * @param $resource_name
165
-     * @param $line
162
+     * @param string $message
163
+     * @param string $style
164
+     * @param string $resource_name
165
+     * @param string $line
166 166
      * @param string $plural
167 167
      * @param int $count
168 168
      * @param null $lang
Please login to merge, or discard this patch.