@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $databaseArray |
189 | 189 | ); |
190 | 190 | |
191 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
191 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
192 | 192 | |
193 | 193 | return $entity; |
194 | 194 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ['id' => $entity->id] |
216 | 216 | ); |
217 | 217 | |
218 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
218 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
219 | 219 | |
220 | 220 | return $entity; |
221 | 221 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | list($uSec, $sec) = explode(' ', microtime()); |
30 | 30 | |
31 | - return ((float) $uSec + (float) $sec); |
|
31 | + return ((float)$uSec + (float)$sec); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $databaseArray |
185 | 185 | ); |
186 | 186 | |
187 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
187 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
188 | 188 | |
189 | 189 | return $entity; |
190 | 190 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | ['cache_id' => $entity->cacheId] |
212 | 212 | ); |
213 | 213 | |
214 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
214 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
215 | 215 | |
216 | 216 | return $entity; |
217 | 217 | } |
@@ -300,38 +300,38 @@ discard block |
||
300 | 300 | $entity = new GeoCacheEntity(); |
301 | 301 | $entity->cacheId = $data['cache_id']; |
302 | 302 | $entity->uuid = $data['uuid']; |
303 | - $entity->node = (int) $data['node']; |
|
303 | + $entity->node = (int)$data['node']; |
|
304 | 304 | $entity->dateCreated = new DateTime($data['date_created']); |
305 | - $entity->isPublishdate = (bool) $data['is_publishdate']; |
|
305 | + $entity->isPublishdate = (bool)$data['is_publishdate']; |
|
306 | 306 | $entity->lastModified = new DateTime($data['last_modified']); |
307 | - $entity->okapiSyncbase = (int) $data['okapi_syncbase']; |
|
307 | + $entity->okapiSyncbase = (int)$data['okapi_syncbase']; |
|
308 | 308 | $entity->listingLastModified = new DateTime($data['listing_last_modified']); |
309 | 309 | $entity->metaLastModified = new DateTime($data['meta_last_modified']); |
310 | - $entity->userId = (int) $data['user_id']; |
|
310 | + $entity->userId = (int)$data['user_id']; |
|
311 | 311 | $entity->name = $data['name']; |
312 | - $entity->longitude = (double) $data['longitude']; |
|
313 | - $entity->latitude = (double) $data['latitude']; |
|
314 | - $entity->type = (int) $data['type']; |
|
315 | - $entity->status = (int) $data['status']; |
|
312 | + $entity->longitude = (double)$data['longitude']; |
|
313 | + $entity->latitude = (double)$data['latitude']; |
|
314 | + $entity->type = (int)$data['type']; |
|
315 | + $entity->status = (int)$data['status']; |
|
316 | 316 | $entity->country = $data['country']; |
317 | 317 | $entity->dateHidden = new DateTime($data['date_hidden']); |
318 | - $entity->size = (int) $data['size']; |
|
319 | - $entity->difficulty = (int) $data['difficulty']; |
|
320 | - $entity->terrain = (int) $data['terrain']; |
|
318 | + $entity->size = (int)$data['size']; |
|
319 | + $entity->difficulty = (int)$data['difficulty']; |
|
320 | + $entity->terrain = (int)$data['terrain']; |
|
321 | 321 | $entity->logpw = $data['logpw']; |
322 | - $entity->searchTime = (float) $data['search_time']; |
|
323 | - $entity->wayLength = (float) $data['way_length']; |
|
322 | + $entity->searchTime = (float)$data['search_time']; |
|
323 | + $entity->wayLength = (float)$data['way_length']; |
|
324 | 324 | $entity->wpGc = $data['wp_gc']; |
325 | 325 | $entity->wpGcMaintained = $data['wp_gc_maintained']; |
326 | 326 | $entity->wpOc = $data['wp_oc']; |
327 | 327 | $entity->descLanguages = $data['desc_languages']; |
328 | 328 | $entity->defaultDesclang = $data['default_desclang']; |
329 | 329 | $entity->dateActivate = new DateTime($data['date_activate']); |
330 | - $entity->needNpaRecalc = (bool) $data['need_npa_recalc']; |
|
331 | - $entity->showCachelists = (bool) $data['show_cachelists']; |
|
332 | - $entity->protectOldCoords = (bool) $data['protect_old_coords']; |
|
333 | - $entity->needsMaintenance = (bool) $data['needs_maintenance']; |
|
334 | - $entity->listingOutdated = (bool) $data['listing_outdated']; |
|
330 | + $entity->needNpaRecalc = (bool)$data['need_npa_recalc']; |
|
331 | + $entity->showCachelists = (bool)$data['show_cachelists']; |
|
332 | + $entity->protectOldCoords = (bool)$data['protect_old_coords']; |
|
333 | + $entity->needsMaintenance = (bool)$data['needs_maintenance']; |
|
334 | + $entity->listingOutdated = (bool)$data['listing_outdated']; |
|
335 | 335 | $entity->flagsLastModified = new DateTime($data['flags_last_modified']); |
336 | 336 | |
337 | 337 | return $entity; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $databaseArray |
181 | 181 | ); |
182 | 182 | |
183 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
183 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
184 | 184 | |
185 | 185 | return $entity; |
186 | 186 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | ['id' => $entity->id] |
208 | 208 | ); |
209 | 209 | |
210 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
210 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
211 | 211 | |
212 | 212 | return $entity; |
213 | 213 | } |
@@ -280,27 +280,27 @@ discard block |
||
280 | 280 | public function getEntityFromDatabaseArray(array $data) |
281 | 281 | { |
282 | 282 | $entity = new GeoCacheLogEntity(); |
283 | - $entity->id = (int) $data['id']; |
|
283 | + $entity->id = (int)$data['id']; |
|
284 | 284 | $entity->uuid = $data['uuid']; |
285 | - $entity->node = (int) $data['node']; |
|
285 | + $entity->node = (int)$data['node']; |
|
286 | 286 | $entity->dateCreated = new DateTime($data['date_created']); |
287 | 287 | $entity->entryLastModified = new DateTime($data['entry_last_modified']); |
288 | 288 | $entity->lastModified = new DateTime($data['last_modified']); |
289 | - $entity->okapiSyncbase = (int) $data['okapi_syncbase']; |
|
289 | + $entity->okapiSyncbase = (int)$data['okapi_syncbase']; |
|
290 | 290 | $entity->logLastModified = new DateTime($data['log_last_modified']); |
291 | - $entity->cacheId = (int) $data['cache_id']; |
|
292 | - $entity->userId = (int) $data['user_id']; |
|
293 | - $entity->type = (int) $data['type']; |
|
294 | - $entity->ocTeamComment = (bool) $data['oc_team_comment']; |
|
291 | + $entity->cacheId = (int)$data['cache_id']; |
|
292 | + $entity->userId = (int)$data['user_id']; |
|
293 | + $entity->type = (int)$data['type']; |
|
294 | + $entity->ocTeamComment = (bool)$data['oc_team_comment']; |
|
295 | 295 | $entity->date = new DateTime($data['date']); |
296 | 296 | $entity->orderDate = new DateTime($data['order_date']); |
297 | - $entity->needsMaintenance = (bool) $data['needs_maintenance']; |
|
298 | - $entity->listingOutdated = (bool) $data['listing_outdated']; |
|
297 | + $entity->needsMaintenance = (bool)$data['needs_maintenance']; |
|
298 | + $entity->listingOutdated = (bool)$data['listing_outdated']; |
|
299 | 299 | $entity->text = $data['text']; |
300 | - $entity->textHtml = (bool) $data['text_html']; |
|
301 | - $entity->textHtmledit = (bool) $data['text_htmledit']; |
|
302 | - $entity->ownerNotified = (bool) $data['owner_notified']; |
|
303 | - $entity->picture = (int) $data['picture']; |
|
300 | + $entity->textHtml = (bool)$data['text_html']; |
|
301 | + $entity->textHtmledit = (bool)$data['text_htmledit']; |
|
302 | + $entity->ownerNotified = (bool)$data['owner_notified']; |
|
303 | + $entity->picture = (int)$data['picture']; |
|
304 | 304 | |
305 | 305 | return $entity; |
306 | 306 | } |
@@ -576,7 +576,7 @@ |
||
576 | 576 | } |
577 | 577 | |
578 | 578 | /** |
579 | - * @param $d |
|
579 | + * @param integer $d |
|
580 | 580 | * @param int $n |
581 | 581 | * |
582 | 582 | * @return string |
@@ -113,6 +113,9 @@ discard block |
||
113 | 113 | return 0; |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @return string |
|
118 | + */ |
|
116 | 119 | public static function landFromLocid($locid) |
117 | 120 | { |
118 | 121 | if (!is_numeric($locid)) { |
@@ -140,6 +143,9 @@ discard block |
||
140 | 143 | return ''; |
141 | 144 | } |
142 | 145 | |
146 | + /** |
|
147 | + * @return string |
|
148 | + */ |
|
143 | 149 | public static function regierungsbezirkFromLocid($locid) |
144 | 150 | { |
145 | 151 | if (!is_numeric($locid)) { |
@@ -166,6 +172,9 @@ discard block |
||
166 | 172 | return ''; |
167 | 173 | } |
168 | 174 | |
175 | + /** |
|
176 | + * @return string |
|
177 | + */ |
|
169 | 178 | public static function landkreisFromLocid($locid) |
170 | 179 | { |
171 | 180 | if (!is_numeric($locid)) { |
@@ -504,6 +504,9 @@ |
||
504 | 504 | ); |
505 | 505 | } |
506 | 506 | |
507 | +/** |
|
508 | + * @param string $watchtext |
|
509 | + */ |
|
507 | 510 | function insert_recommendation($rLog, $language, $watchtext) |
508 | 511 | { |
509 | 512 | global $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) |
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) |
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) |
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) |
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 = '') |
97 | 106 | { |
98 | 107 | $objectCount = sql_value( |