Completed
Pull Request — development (#769)
by Nick
04:21
created
local/devel/Repositories/AttributeGroupsRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $databaseArray
122 122
         );
123 123
 
124
-        $entity->id = (int) $this->connection->lastInsertId();
124
+        $entity->id = (int)$this->connection->lastInsertId();
125 125
 
126 126
         return $entity;
127 127
     }
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
     public function getEntityFromDatabaseArray(array $data)
189 189
     {
190 190
         $entity = new AttributeGroupsEntity();
191
-        $entity->id = (int) $data['id'];
192
-        $entity->categoryId = (int) $data['category_id'];
193
-        $entity->name = (string) $data['name'];
194
-        $entity->transId = (int) $data['trans_id'];
191
+        $entity->id = (int)$data['id'];
192
+        $entity->categoryId = (int)$data['category_id'];
193
+        $entity->name = (string)$data['name'];
194
+        $entity->transId = (int)$data['trans_id'];
195 195
 
196 196
         return $entity;
197 197
     }
Please login to merge, or discard this patch.
local/devel/Repositories/LoginsRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $databaseArray
122 122
         );
123 123
 
124
-        $entity->id = (int) $this->connection->lastInsertId();
124
+        $entity->id = (int)$this->connection->lastInsertId();
125 125
 
126 126
         return $entity;
127 127
     }
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
     public function getEntityFromDatabaseArray(array $data)
190 190
     {
191 191
         $entity = new LoginsEntity();
192
-        $entity->id = (int) $data['id'];
193
-        $entity->userId = (int) $data['user_id'];
194
-        $entity->remoteAddr = (string) $data['remote_addr'];
195
-        $entity->success = (int) $data['success'];
192
+        $entity->id = (int)$data['id'];
193
+        $entity->userId = (int)$data['user_id'];
194
+        $entity->remoteAddr = (string)$data['remote_addr'];
195
+        $entity->success = (int)$data['success'];
196 196
         $entity->timestamp = new DateTime($data['timestamp']);
197 197
 
198 198
         return $entity;
Please login to merge, or discard this patch.
local/devel/Repositories/GkUserRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $databaseArray
122 122
         );
123 123
 
124
-        $entity->id = (int) $this->connection->lastInsertId();
124
+        $entity->id = (int)$this->connection->lastInsertId();
125 125
 
126 126
         return $entity;
127 127
     }
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
     public function getEntityFromDatabaseArray(array $data)
187 187
     {
188 188
         $entity = new GkUserEntity();
189
-        $entity->id = (int) $data['id'];
190
-        $entity->name = (string) $data['name'];
189
+        $entity->id = (int)$data['id'];
190
+        $entity->name = (string)$data['name'];
191 191
 
192 192
         return $entity;
193 193
     }
Please login to merge, or discard this patch.
local/devel/Repositories/OkapiAuthorizationsRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $databaseArray
122 122
         );
123 123
 
124
-        $entity->consumerKey = (int) $this->connection->lastInsertId();
124
+        $entity->consumerKey = (int)$this->connection->lastInsertId();
125 125
 
126 126
         return $entity;
127 127
     }
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
     public function getEntityFromDatabaseArray(array $data)
188 188
     {
189 189
         $entity = new OkapiAuthorizationsEntity();
190
-        $entity->consumerKey = (string) $data['consumer_key'];
191
-        $entity->userId = (int) $data['user_id'];
190
+        $entity->consumerKey = (string)$data['consumer_key'];
191
+        $entity->userId = (int)$data['user_id'];
192 192
         $entity->lastAccessToken = new DateTime($data['last_access_token']);
193 193
 
194 194
         return $entity;
Please login to merge, or discard this patch.
htdocs/lib2/logic/cachelist.class.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -435,8 +435,8 @@  discard block
 block discarded – undo
435 435
             . ($namelike ? " AND `name` LIKE '%" . sql_escape($namelike) . "%'" : '')
436 436
             . ($userlike ? " AND `username` LIKE '%" . sql_escape($userlike) . "%'" : ''),
437 437
             0,
438
-            (int) $startat,
439
-            (int) $maxitems,
438
+            (int)$startat,
439
+            (int)$maxitems,
440 440
             true
441 441
         );
442 442
     }
@@ -526,8 +526,8 @@  discard block
 block discarded – undo
526 526
              ORDER BY `prio`, $nameField
527 527
              LIMIT &2,&3",
528 528
             $login->userid,
529
-            (int) $startat,
530
-            (int) $maxitems
529
+            (int)$startat,
530
+            (int)$maxitems
531 531
         );
532 532
 
533 533
         $lists = sql_fetch_assoc_table($rs);
Please login to merge, or discard this patch.
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -145,6 +145,9 @@  discard block
 block discarded – undo
145 145
         return $this->reCachelist->setValue('description', $desc);
146 146
     }
147 147
 
148
+    /**
149
+     * @param string $pw
150
+     */
148 151
     public function setPassword($pw): void
149 152
     {
150 153
         $this->reCachelist->setValue('password', $pw);
@@ -225,6 +228,9 @@  discard block
 block discarded – undo
225 228
         return sql_fetch_assoc_table($rs);
226 229
     }
227 230
 
231
+    /**
232
+     * @param string $wp
233
+     */
228 234
     public function addCacheByWP($wp)
229 235
     {
230 236
         $cache = cache::fromWP($wp);
@@ -261,6 +267,9 @@  discard block
 block discarded – undo
261 267
         return $this->addCache(new cache($cache_id));
262 268
     }
263 269
 
270
+    /**
271
+     * @param cache $cache
272
+     */
264 273
     public function addCache($cache)
265 274
     {
266 275
         if (!$cache->exist() || !$cache->allowView()) {
@@ -496,6 +505,10 @@  discard block
 block discarded – undo
496 505
         return false;
497 506
     }
498 507
 
508
+    /**
509
+     * @param string $condition
510
+     * @param integer $maxitems
511
+     */
499 512
     private static function getLists(
500 513
         $condition,
501 514
         $prio = 0,
Please login to merge, or discard this patch.
htdocs/newcaches.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
             ]
73 73
         )
74 74
         ->orderBy('caches.' . $dateField, $sortOrder)
75
-        ->setFirstResult((int) $startAt)
76
-        ->setMaxResults((int) $perpage);
75
+        ->setFirstResult((int)$startAt)
76
+        ->setMaxResults((int)$perpage);
77 77
 
78 78
     if ($country) {
79 79
         $newCachesQuery->andWhere('`caches`.`country`= :country');
Please login to merge, or discard this patch.
htdocs/lib/clicompatbase.inc.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 /**
400 400
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
401 401
  * @param $value
402
- * @return false|string
402
+ * @return string
403 403
  */
404 404
 function sql_escape($value)
405 405
 {
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 /**
414 414
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
415 415
  * @param $value
416
- * @return false|mixed|string
416
+ * @return string
417 417
  */
418 418
 function sql_escape_backtick($value)
419 419
 {
Please login to merge, or discard this patch.
htdocs/lib2/db.inc.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 /**
85 85
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
86 86
  * @param $sql
87
- * @return resource
87
+ * @return mysqli_result
88 88
  */
89 89
 function sql($sql)
90 90
 {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 /**
115 115
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
116 116
  * @param $sql
117
- * @return resource
117
+ * @return mysqli_result
118 118
  */
119 119
 function sql_slave($sql)
120 120
 {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
145 145
  * @param $dblink
146 146
  * @param $sql
147
- * @return resource
147
+ * @return mysqli_result
148 148
  */
149 149
 function sql_internal($dblink, $sql)
150 150
 {
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 /**
343 343
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
344 344
  * @param string $sql
345
- * @return resource
345
+ * @return mysqli_result
346 346
  */
347 347
 function sqlf($sql)
348 348
 {
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 /**
361 361
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
362 362
  * @param string $sql
363
- * @return resource
363
+ * @return mysqli_result
364 364
  */
365 365
 function sqlf_slave($sql)
366 366
 {
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 /**
379 379
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
380 380
  * @param string $sql
381
- * @return resource
381
+ * @return mysqli_result
382 382
  */
383 383
 function sqll($sql)
384 384
 {
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
 
1229 1229
 /**
1230 1230
  * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation
1231
- * @param $f
1231
+ * @param resource $f
1232 1232
  * @param resource $rs
1233 1233
  * @param $table
1234 1234
  * @param bool $truncate
Please login to merge, or discard this patch.
local/stat/coordstat.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     $year = substr($cache['date_created'], 0, 4);
25 25
     if ($year >= 2005 && $year <= date('Y') && ($lat != 0 || $long != 0)) {
26 26
         $years[$year] = true;
27
-        $liste[$lat][$long]['caches'][$year] ++;
27
+        $liste[$lat][$long]['caches'][$year]++;
28 28
     }
29 29
 }
30 30
 mysqli_free_result($rs);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $year = substr($cache['date'], 0, 4);
49 49
         if ($year >= 2005 && $year <= date('Y') && ($lat != 0 || $long != 0)) {
50 50
             $years[$year] = true;
51
-            $liste[$lat][$long]['logs'][$year] ++;
51
+            $liste[$lat][$long]['logs'][$year]++;
52 52
         }
53 53
     }
54 54
     mysqli_free_result($rs);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 while ($cache = sql_fetch_assoc($rs)) {
66 66
     $lat = floor($cache['latitude'] / $grid);
67 67
     $long = floor($cache['longitude'] / $grid);
68
-    $liste[$lat][$long]['caches']['all'] ++;
68
+    $liste[$lat][$long]['caches']['all']++;
69 69
     $liste[$lat][$long]['logs']['all'] += $cache['logs'];
70 70
 }
71 71
 mysqli_free_result($rs);
Please login to merge, or discard this patch.