Passed
Pull Request — development (#686)
by Thomas
06:49
created
htdocs/lib2/OcSmarty.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public $main_template = 'sys_main';
20 20
     public $bench = null;
21 21
     public $compile_id = null;
22
-    public $cache_id = null;    // This is a smarty caching ID, not a caches.cache_id.
22
+    public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id.
23 23
     public $title = '';
24 24
     public $menuitem = null;
25 25
     public $nowpsearch = false;
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -598,8 +598,8 @@  discard block
 block discarded – undo
598 598
         return $sTarget;
599 599
     }
600 600
 
601
-     public function acceptsAndPurifiesHtmlInput()
602
-     {
601
+        public function acceptsAndPurifiesHtmlInput()
602
+        {
603 603
         // Prevent false XSS detection of harmless HTML code
604 604
         // see https://redmine.opencaching.de/issues/1137
605 605
         // see https://stackoverflow.com/questions/43249998/chrome-err-blocked-by-xss-auditor-details
@@ -609,5 +609,5 @@  discard block
 block discarded – undo
609 609
         // This is ensured by HTMLpurifier in OC code.
610 610
 
611 611
         header('X-XSS-Protection: 0');
612
-     }
612
+        }
613 613
 }
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
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     $errorlog_dir = __DIR__ . '/../var/errorlog';
135 135
     $errorlog_path = $errorlog_dir . '/errorlog-' . date('Y-m-d');
136 136
 
137
-    $error_mail_limit = 32768;    // send max 32 KB = ca. 5-20 errors per day/logfile
137
+    $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile
138 138
 
139 139
     // All errors which may happen here are ignored, to avoid error recursions.
140 140
 
Please login to merge, or discard this patch.
htdocs/util/watchlist/runwatch.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -608,7 +608,7 @@
 block discarded – undo
608 608
         $pid_daemon = fgets($pidfile, 20);
609 609
         fclose($pidfile);
610 610
 
611
-        $pid_daemon = (int) $pid_daemon;
611
+        $pid_daemon = (int)$pid_daemon;
612 612
 
613 613
         // process running?
614 614
         if (posix_kill($pid_daemon, 0)) {
Please login to merge, or discard this patch.
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -27,6 +27,10 @@  discard block
 block discarded – undo
27 27
 }
28 28
 
29 29
 if (!function_exists('get_logtype_name')) {
30
+
31
+    /**
32
+     * @return string
33
+     */
30 34
     function get_logtype_name($logtype, $language)
31 35
     {
32 36
         return sqlValue(
@@ -504,6 +508,9 @@  discard block
 block discarded – undo
504 508
     );
505 509
 }
506 510
 
511
+/**
512
+ * @param string $watchtext
513
+ */
507 514
 function insert_recommendation($rLog, $language, $watchtext)
508 515
 {
509 516
     global $translate;
Please login to merge, or discard this patch.
htdocs/lib2/logic/getNew.class.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     }
18 18
 
19 19
     /**
20
-     * @param $userCountry
20
+     * @param string $userCountry
21 21
      */
22 22
     public function set_userCountry($userCountry)
23 23
     {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @param string $type type of the "new"-information, i.e. cache, event, rating, etc
43 43
      * @param array $args numeric array containing the parameter for "sql_slave"
44
-     * @return object mysql result used by smarty assign_rs
44
+     * @return resource|null mysql result used by smarty assign_rs
45 45
      */
46 46
     public function rsForSmarty($type, $args = null)
47 47
     {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * cacheRs executes the database statements for type "cache"
90 90
      *
91 91
      * @param array $args numeric array containing the parameter for "sql_slave"
92
-     * @return object mysql result used by smarty assign_rs
92
+     * @return resource mysql result used by smarty assign_rs
93 93
      */
94 94
     private function cacheRs($args = null)
95 95
     {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      * eventRs executes the database statements for type "event"
144 144
      *
145 145
      * @param array $args numeric array containing the parameter for "sql_slave"
146
-     * @return object mysql result used by smarty assign_rs
146
+     * @return resource mysql result used by smarty assign_rs
147 147
      */
148 148
     private function eventRs($args = null)
149 149
     {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      * ratingRs executes the database statements for type "rating"
216 216
      *
217 217
      * @param array $args numeric array containing the parameter for "sql_slave"
218
-     * @return object mysql result used by smarty assign_rs
218
+     * @return resource mysql result used by smarty assign_rs
219 219
      */
220 220
     private function ratingRs($args = null)
221 221
     {
Please login to merge, or discard this patch.
htdocs/lib2/search/search.html.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
         // decide if the cache is new
87 87
         $dDiff = dateDiff('d', $rCache['date_created'], date('Y-m-d'));
88 88
 
89
-        $rCache['isnew'] = ($dDiff <= NEWCACHES_DAYS && (int) $rCache['type'] !== 6);
89
+        $rCache['isnew'] = ($dDiff <= NEWCACHES_DAYS && (int)$rCache['type'] !== 6);
90 90
 
91 91
         // get last logs
92 92
         if ($options['sort'] != 'bymylastlog' || !$login->logged_in()) {
Please login to merge, or discard this patch.
htdocs/src/OcLegacy/Cronjobs/SiteMaps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $page = $opt['page'];
54 54
         $url = ($page['https']['mode'] == HTTPS_ENFORCED ? $page['absolute_https_url'] : $page['absolute_http_url']);
55 55
 
56
-        $url = urlencode($url. 'sitemap.xml');
56
+        $url = urlencode($url . 'sitemap.xml');
57 57
 
58 58
         $this->pingSearchEngine('http://www.google.com/webmasters/ping?sitemap=' . $url);
59 59
         $this->pingSearchEngine(
Please login to merge, or discard this patch.
htdocs/src/OcLegacy/Util/SiteMapXml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $sXML .= '<lastmod>' . xmlentities(date('c', $dLastMod)) . '</lastmod>';
63 63
         $sXML .= '<changefreq>' . xmlentities($sChangeFreq) . '</changefreq>';
64 64
         $sXML .= '<priority>' . xmlentities($nPriority) . '</priority>';
65
-        $sXML .= '</url>'."\n";
65
+        $sXML .= '</url>' . "\n";
66 66
 
67 67
         $this->writeInternal($sXML);
68 68
     }
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/geokrety.class.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
     /**
294 294
      * @param integer $id
295
-     * @param $name
295
+     * @param string $name
296 296
      */
297 297
     public function checkGeoKretType($id, $name)
298 298
     {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
     /**
308 308
      * @param integer $id
309
-     * @param $name
309
+     * @param string $name
310 310
      */
311 311
     public function checkUser($id, $name)
312 312
     {
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 
321 321
     /**
322 322
      * @param integer $id
323
-     * @param $name
323
+     * @param string $name
324 324
      */
325 325
     public function checkMoveType($id, $name)
326 326
     {
Please login to merge, or discard this patch.
htdocs/addtolist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 $tpl->menuitem = MNU_CACHES_ADDTOLIST;
10 10
 
11 11
 $login->verify();
12
-if ($login->userid  == 0) {
12
+if ($login->userid == 0) {
13 13
     $tpl->redirect_login();
14 14
 }
15 15
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $default_list = isset($_REQUEST['listid']) ? (int)$_REQUEST['listid'] : cachelist::getMyLastAddedToListId();
33 33
 
34 34
 if (isset($_REQUEST['save'], $_REQUEST['listid'])) {
35
-    $listId = (int) $_REQUEST['listid'];
35
+    $listId = (int)$_REQUEST['listid'];
36 36
     if ($listId === 0) {
37 37
         $cacheList = new cachelist(ID_NEW, $login->userid);
38 38
         $name_error = $cacheList->setNameAndVisibility($newListName, $newListPublic ? 2 : 0);
Please login to merge, or discard this patch.