@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
20 | - * @param $userCountry |
|
20 | + * @param string $userCountry |
|
21 | 21 | */ |
22 | 22 | public function set_userCountry($userCountry): void |
23 | 23 | { |
@@ -41,7 +41,7 @@ discard block |
||
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 mysqli_result|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 |
||
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 mysqli_result mysql result used by smarty assign_rs |
|
93 | 93 | */ |
94 | 94 | private function cacheRs($args = null) |
95 | 95 | { |
@@ -143,7 +143,7 @@ discard block |
||
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 mysqli_result mysql result used by smarty assign_rs |
|
147 | 147 | */ |
148 | 148 | private function eventRs($args = null) |
149 | 149 | { |
@@ -215,7 +215,7 @@ discard block |
||
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 mysqli_result mysql result used by smarty assign_rs |
|
219 | 219 | */ |
220 | 220 | private function ratingRs($args = null) |
221 | 221 | { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * Use {page} in link_url als placeholder for the selected page number |
22 | 22 | * and/or {offset} for the 0-based data offset of the selected page. |
23 | 23 | * |
24 | - * @param $link_url |
|
24 | + * @param string $link_url |
|
25 | 25 | * @param int $min_pages_shown |
26 | 26 | * @param int $max_pages_shown |
27 | 27 | */ |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * @param $current_page |
|
42 | - * @param $total_pages |
|
41 | + * @param double $current_page |
|
42 | + * @param double $total_pages |
|
43 | 43 | * @param bool $page_size |
44 | 44 | */ |
45 | 45 | public function make_from_pagenr($current_page, $total_pages, $page_size = false): void |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | /** |
112 | 112 | * @param $page |
113 | - * @param $page_size |
|
113 | + * @param boolean $page_size |
|
114 | 114 | * |
115 | 115 | * @return string |
116 | 116 | */ |
@@ -147,11 +147,17 @@ discard block |
||
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | + /** |
|
151 | + * @param integer $zoom |
|
152 | + */ |
|
150 | 153 | private function lonToTile($long, $zoom) |
151 | 154 | { |
152 | 155 | return (($long + 180) / 360) * (2 ** $zoom); |
153 | 156 | } |
154 | 157 | |
158 | + /** |
|
159 | + * @param integer $zoom |
|
160 | + */ |
|
155 | 161 | private function latToTile($lat, $zoom) |
156 | 162 | { |
157 | 163 | return (1 - log(tan($lat * M_PI / 180) + 1 / cos($lat * M_PI / 180)) / M_PI) / 2 * (2 ** $zoom); |
@@ -247,6 +253,10 @@ discard block |
||
247 | 253 | } |
248 | 254 | } |
249 | 255 | |
256 | + /** |
|
257 | + * @param string $pathname |
|
258 | + * @param integer $mode |
|
259 | + */ |
|
250 | 260 | private function mkdirRecursive($pathname, $mode): bool |
251 | 261 | { |
252 | 262 | is_dir(dirname($pathname)) || $this->mkdirRecursive(dirname($pathname), $mode); |
@@ -254,6 +264,9 @@ discard block |
||
254 | 264 | return is_dir($pathname) || mkdir($pathname, $mode) || is_dir($pathname); |
255 | 265 | } |
256 | 266 | |
267 | + /** |
|
268 | + * @param string $data |
|
269 | + */ |
|
257 | 270 | private function writeTileToCache($url, $data): void |
258 | 271 | { |
259 | 272 | $filename = $this->tileUrlToFilename($url); |
@@ -261,6 +274,9 @@ discard block |
||
261 | 274 | file_put_contents($filename, $data); |
262 | 275 | } |
263 | 276 | |
277 | + /** |
|
278 | + * @param string $url |
|
279 | + */ |
|
264 | 280 | private function fetchTile($url) |
265 | 281 | { |
266 | 282 | if ($this->useTileCache && $cached = $this->checkTileCache($url)) { |
@@ -133,6 +133,9 @@ |
||
133 | 133 | sql_free_result($rs); |
134 | 134 | } |
135 | 135 | |
136 | + /** |
|
137 | + * @param string $comment |
|
138 | + */ |
|
136 | 139 | public function archiveCache($cache_id, $comment, $months = 0): void |
137 | 140 | { |
138 | 141 | global $login, $translate; |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | |
292 | 292 | /** |
293 | 293 | * @param int $id |
294 | - * @param $name |
|
294 | + * @param string $name |
|
295 | 295 | */ |
296 | 296 | public function checkGeoKretType($id, $name): void |
297 | 297 | { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | /** |
306 | 306 | * @param int $id |
307 | - * @param $name |
|
307 | + * @param string $name |
|
308 | 308 | */ |
309 | 309 | public function checkUser($id, $name): void |
310 | 310 | { |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | |
318 | 318 | /** |
319 | 319 | * @param int $id |
320 | - * @param $name |
|
320 | + * @param string $name |
|
321 | 321 | */ |
322 | 322 | public function checkMoveType($id, $name): void |
323 | 323 | { |
@@ -81,6 +81,10 @@ discard block |
||
81 | 81 | return preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/', $datetime); |
82 | 82 | } |
83 | 83 | |
84 | + /** |
|
85 | + * @param integer $level |
|
86 | + * @param string $text |
|
87 | + */ |
|
84 | 88 | private static function message($level, $text): void |
85 | 89 | { |
86 | 90 | echo str_repeat(' ', 2 * $level) . $text . "\n"; |
@@ -93,6 +97,11 @@ discard block |
||
93 | 97 | ' AND `' . $table . '`.`' . $field . "` <= '" . sql_escape($this->toDateTime) . "'"; |
94 | 98 | } |
95 | 99 | |
100 | + /** |
|
101 | + * @param string $table |
|
102 | + * @param string $dateField |
|
103 | + * @param string $description |
|
104 | + */ |
|
96 | 105 | private function showObjectCount($table, $dateField, $description, $andWhere = ''): void |
97 | 106 | { |
98 | 107 | $objectCount = sql_value( |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | public $nCachelistId = 0; |
19 | 19 | public $reCachelist; |
20 | 20 | |
21 | + /** |
|
22 | + * @param integer $nNewCacheListId |
|
23 | + */ |
|
21 | 24 | public function __construct($nNewCacheListId = ID_NEW, $nUserId = 0) |
22 | 25 | { |
23 | 26 | $this->reCachelist = new rowEditor('cache_lists'); |
@@ -145,6 +148,9 @@ discard block |
||
145 | 148 | return $this->reCachelist->setValue('description', $desc); |
146 | 149 | } |
147 | 150 | |
151 | + /** |
|
152 | + * @param string $pw |
|
153 | + */ |
|
148 | 154 | public function setPassword($pw): void |
149 | 155 | { |
150 | 156 | $this->reCachelist->setValue('password', $pw); |
@@ -225,6 +231,9 @@ discard block |
||
225 | 231 | return sql_fetch_assoc_table($rs); |
226 | 232 | } |
227 | 233 | |
234 | + /** |
|
235 | + * @param string $wp |
|
236 | + */ |
|
228 | 237 | public function addCacheByWP($wp) |
229 | 238 | { |
230 | 239 | $cache = cache::fromWP($wp); |
@@ -273,6 +282,9 @@ discard block |
||
273 | 282 | return $this->addCache(new cache($cache_id)); |
274 | 283 | } |
275 | 284 | |
285 | + /** |
|
286 | + * @param cache $cache |
|
287 | + */ |
|
276 | 288 | public function addCache($cache) |
277 | 289 | { |
278 | 290 | if (!$cache->exist() || !$cache->allowView()) { |
@@ -508,6 +520,10 @@ discard block |
||
508 | 520 | return false; |
509 | 521 | } |
510 | 522 | |
523 | + /** |
|
524 | + * @param string $condition |
|
525 | + * @param integer $maxitems |
|
526 | + */ |
|
511 | 527 | private static function getLists( |
512 | 528 | $condition, |
513 | 529 | $prio = 0, |