Completed
Pull Request — development (#730)
by Kai
09:59 queued 02:50
created
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
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)
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.
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.
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/src/OcLegacy/Map/StaticMap.php 2 patches
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -91,11 +91,17 @@  discard block
 block discarded – undo
91 91
         }
92 92
     }
93 93
 
94
+    /**
95
+     * @param integer $zoom
96
+     */
94 97
     private function lonToTile($long, $zoom)
95 98
     {
96 99
         return (($long + 180) / 360) * (2 ** $zoom);
97 100
     }
98 101
 
102
+    /**
103
+     * @param integer $zoom
104
+     */
99 105
     private function latToTile($lat, $zoom)
100 106
     {
101 107
         return (1 - log(tan($lat * M_PI / 180) + 1 / cos($lat * M_PI / 180)) / M_PI) / 2 * (2 ** $zoom);
@@ -192,6 +198,10 @@  discard block
 block discarded – undo
192 198
         }
193 199
     }
194 200
 
201
+    /**
202
+     * @param string $pathname
203
+     * @param integer $mode
204
+     */
195 205
     private function mkdirRecursive($pathname, $mode)
196 206
     {
197 207
         is_dir(dirname($pathname)) || $this->mkdirRecursive(dirname($pathname), $mode);
@@ -199,6 +209,9 @@  discard block
 block discarded – undo
199 209
         return is_dir($pathname) || mkdir($pathname, $mode) || is_dir($pathname);
200 210
     }
201 211
 
212
+    /**
213
+     * @param string $data
214
+     */
202 215
     private function writeTileToCache($url, $data)
203 216
     {
204 217
         $filename = $this->tileUrlToFilename($url);
@@ -206,6 +219,9 @@  discard block
 block discarded – undo
206 219
         file_put_contents($filename, $data);
207 220
     }
208 221
 
222
+    /**
223
+     * @param string $url
224
+     */
209 225
     private function fetchTile($url)
210 226
     {
211 227
         if ($this->useTileCache && $cached = $this->checkTileCache($url)) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     private $useTileCache = true;
35 35
 
36
-    private $tileCacheBaseDir =  __DIR__ . '/../../../var/cache2/staticmap';
36
+    private $tileCacheBaseDir = __DIR__ . '/../../../var/cache2/staticmap';
37 37
 
38 38
     private $zoom = 0;
39 39
 
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 
71 71
         if (isset($_GET['size']) && !empty($_GET['size'])) {
72 72
             list($this->width, $this->height) = explode('x', $_GET['size']);
73
-            $this->width = (int) $this->width;
73
+            $this->width = (int)$this->width;
74 74
             if ($this->width > $this->maxWidth) {
75 75
                 $this->width = $this->maxWidth;
76 76
             }
77
-            $this->height = (int) $this->height;
77
+            $this->height = (int)$this->height;
78 78
             if ($this->height > $this->maxHeight) {
79 79
                 $this->height = $this->maxHeight;
80 80
             }
Please login to merge, or discard this patch.