@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | [$uSec, $sec] = explode(' ', microtime()); |
27 | 27 | |
28 | - return ((float) $uSec + (float) $sec); |
|
28 | + return ((float)$uSec + (float)$sec); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * @var string |
59 | 59 | */ |
60 | - private $tileCacheBaseDir = __DIR__ . '/../../../var/cache2/staticmap'; |
|
60 | + private $tileCacheBaseDir = __DIR__ . '/../../../var/cache2/staticmap'; |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * @var int |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | |
128 | 128 | if (isset($_GET['size']) && !empty($_GET['size'])) { |
129 | 129 | list($this->width, $this->height) = explode('x', $_GET['size']); |
130 | - $this->width = (int) $this->width; |
|
130 | + $this->width = (int)$this->width; |
|
131 | 131 | if ($this->width > $this->maxWidth) { |
132 | 132 | $this->width = $this->maxWidth; |
133 | 133 | } |
134 | - $this->height = (int) $this->height; |
|
134 | + $this->height = (int)$this->height; |
|
135 | 135 | if ($this->height > $this->maxHeight) { |
136 | 136 | $this->height = $this->maxHeight; |
137 | 137 | } |
@@ -15,13 +15,13 @@ discard block |
||
15 | 15 | |
16 | 16 | use OcLegacy\Util\PasswordCrypt; |
17 | 17 | |
18 | -define('LOGIN_UNKNOWN_ERROR', -1); // unknown error occurred |
|
19 | -define('LOGIN_OK', 0); // login succeeded |
|
20 | -define('LOGIN_BADUSERPW', 1); // bad username or password |
|
21 | -define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
22 | -define('LOGIN_USERNOTACTIVE', 3); // the userAccount locked |
|
18 | +define('LOGIN_UNKNOWN_ERROR', -1); // unknown error occurred |
|
19 | +define('LOGIN_OK', 0); // login succeeded |
|
20 | +define('LOGIN_BADUSERPW', 1); // bad username or password |
|
21 | +define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
22 | +define('LOGIN_USERNOTACTIVE', 3); // the userAccount locked |
|
23 | 23 | define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty |
24 | -define('LOGIN_LOGOUT_OK', 5); // logout was successful |
|
24 | +define('LOGIN_LOGOUT_OK', 5); // logout was successful |
|
25 | 25 | |
26 | 26 | // login times in seconds |
27 | 27 | define('LOGIN_TIME', 60 * 60); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | // TODO good input evaluation |
71 | 71 | if ($cookie->is_set('userid') && $cookie->is_set('username')) { |
72 | - $this->userid = (int) $cookie->get('userid'); |
|
72 | + $this->userid = (int)$cookie->get('userid'); |
|
73 | 73 | $this->username = $cookie->get('username'); |
74 | 74 | $this->permanent = (($cookie->get('permanent') + 0) == 1); |
75 | 75 | $this->lastlogin = $cookie->get('lastlogin'); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function pStoreCookie(): void |
101 | 101 | { |
102 | 102 | global $cookie; |
103 | - $cookie->set('userid', (int) $this->userid); |
|
103 | + $cookie->set('userid', (int)$this->userid); |
|
104 | 104 | $cookie->set('username', $this->username); |
105 | 105 | $cookie->set('permanent', ($this->permanent === true ? 1 : 0)); |
106 | 106 | $cookie->set('lastlogin', $this->lastlogin); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $rUser['user_id'], |
295 | 295 | ($permanent != false ? 1 : 0) |
296 | 296 | ); |
297 | - $this->userid = (int) $rUser['user_id']; |
|
297 | + $this->userid = (int)$rUser['user_id']; |
|
298 | 298 | $this->username = $rUser['username']; |
299 | 299 | $this->permanent = $permanent; |
300 | 300 | $this->lastlogin = date('Y-m-d H:i:s'); |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | ); |
341 | 341 | if ($rUser = sql_fetch_assoc($rs)) { |
342 | 342 | $this->username = $rUser['username']; |
343 | - $this->userid = (int) $rUser['user_id']; |
|
343 | + $this->userid = (int)$rUser['user_id']; |
|
344 | 344 | $this->admin = $rUser['admin']; |
345 | 345 | $this->verified = true; |
346 | 346 | sqlf("UPDATE `user` SET `user`.`last_login`=NOW() WHERE `user`.`user_id`='&1'", $this->userid); |
@@ -13,14 +13,14 @@ |
||
13 | 13 | |
14 | 14 | public function push_pos(&$pos): void |
15 | 15 | { |
16 | - $this->stack[count($this->stack)] =& $pos; |
|
17 | - $this->stack_ref =& $pos; |
|
16 | + $this->stack[count($this->stack)] = & $pos; |
|
17 | + $this->stack_ref = & $pos; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function pop_pos(): void |
21 | 21 | { |
22 | 22 | unset($this->stack[count($this->stack) - 1]); |
23 | - $this->stack_ref =& $this->stack[count($this->stack) - 1]; |
|
23 | + $this->stack_ref = & $this->stack[count($this->stack) - 1]; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $opt['rootpath'] = __DIR__ . '/../'; |
12 | 12 | |
13 | 13 | spl_autoload_register( |
14 | - function ($className): void { |
|
14 | + function($className): void { |
|
15 | 15 | if (!preg_match('/^[\w]{1,}$/', $className)) { |
16 | 16 | return; |
17 | 17 | } |
@@ -125,6 +125,6 @@ |
||
125 | 125 | */ |
126 | 126 | $expressionAst = (new ExpressionLanguage())->parse($violation->getPropertyPath(), [])->getNodes(); |
127 | 127 | |
128 | - return (int) $expressionAst->nodes['node']->nodes[1]->attributes['value']; |
|
128 | + return (int)$expressionAst->nodes['node']->nodes[1]->attributes['value']; |
|
129 | 129 | } |
130 | 130 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | WHERE cache_id = :cacheId; |
226 | 226 | SQL |
227 | 227 | , [ |
228 | - 'cacheId' => (int) $cache['cache_id'], |
|
228 | + 'cacheId' => (int)$cache['cache_id'], |
|
229 | 229 | ]); |
230 | 230 | |
231 | 231 | $this->connection->executeQuery(<<<'SQL' |
@@ -237,19 +237,19 @@ discard block |
||
237 | 237 | WHERE cache_id = :cacheId |
238 | 238 | SQL |
239 | 239 | , [ |
240 | - 'cacheId' => (int) $cache['cache_id'], |
|
240 | + 'cacheId' => (int)$cache['cache_id'], |
|
241 | 241 | ]); |
242 | 242 | |
243 | 243 | $this->connection->executeQuery('DELETE FROM cache_desc_modified WHERE cache_id = :cacheId', [ |
244 | - 'cacheId' => (int) $cache['cache_id'], |
|
244 | + 'cacheId' => (int)$cache['cache_id'], |
|
245 | 245 | ]); |
246 | 246 | |
247 | 247 | $this->connection->executeQuery('DELETE FROM cache_ignore WHERE cache_id = :cacheId', [ |
248 | - 'cacheId' => (int) $cache['cache_id'], |
|
248 | + 'cacheId' => (int)$cache['cache_id'], |
|
249 | 249 | ]); |
250 | 250 | |
251 | 251 | $this->connection->executeQuery('DELETE FROM caches_modified WHERE cache_id = :cacheId', [ |
252 | - 'cacheId' => (int) $cache['cache_id'], |
|
252 | + 'cacheId' => (int)$cache['cache_id'], |
|
253 | 253 | ]); |
254 | 254 | } |
255 | 255 | } |
@@ -260,8 +260,8 @@ discard block |
||
260 | 260 | return []; |
261 | 261 | } |
262 | 262 | |
263 | - $ids = array_map(static function (array $cache) use ($idField) { |
|
264 | - return (int) $cache[$idField]; |
|
263 | + $ids = array_map(static function(array $cache) use ($idField) { |
|
264 | + return (int)$cache[$idField]; |
|
265 | 265 | }, $data); |
266 | 266 | |
267 | 267 | $pictures = $this->connection->fetchAll('SELECT * FROM pictures WHERE object_id IN (' . implode(',', $ids) . ') AND object_type = :objectType', [ |
@@ -281,8 +281,8 @@ discard block |
||
281 | 281 | return []; |
282 | 282 | } |
283 | 283 | |
284 | - $ids = array_map(static function (array $cache) use ($idField) { |
|
285 | - return (int) $cache[$idField]; |
|
284 | + $ids = array_map(static function(array $cache) use ($idField) { |
|
285 | + return (int)$cache[$idField]; |
|
286 | 286 | }, $data); |
287 | 287 | |
288 | 288 | return $this->connection->fetchAll('SELECT * FROM pictures_modified WHERE object_id IN (' . implode(',', $ids) . ') AND object_type = :objectType', [ |
@@ -1,4 +1,4 @@ |
||
1 | -<?php return array ( |
|
1 | +<?php return array( |
|
2 | 2 | 'version_number' => 1926, |
3 | 3 | 'git_revision' => 'dbed1d0d908dcc00a4aa7387de2e08b727dccee8', |
4 | 4 | ); |
5 | 5 | \ No newline at end of file |
@@ -359,13 +359,13 @@ discard block |
||
359 | 359 | |
360 | 360 | file_put_contents( |
361 | 361 | __DIR__ . '/Entities/' . $classNameEntity . '.php', |
362 | - "<?php \n\n" . (string) $classEntity, |
|
362 | + "<?php \n\n" . (string)$classEntity, |
|
363 | 363 | LOCK_EX |
364 | 364 | ); |
365 | 365 | |
366 | 366 | file_put_contents( |
367 | 367 | __DIR__ . '/Entities/' . $classNameEntity . 'Test.php', |
368 | - "<?php \n\n use OcTest\Modules\AbstractModuleTest; \n\n" . (string) $classEntityTest, |
|
368 | + "<?php \n\n use OcTest\Modules\AbstractModuleTest; \n\n" . (string)$classEntityTest, |
|
369 | 369 | LOCK_EX |
370 | 370 | ); |
371 | 371 | |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | use Oc\Repository\Exception\RecordNotFoundException; |
379 | 379 | use Oc\Repository\Exception\RecordNotPersistedException; |
380 | 380 | use Oc\Repository\Exception\RecordsNotFoundException; \n\n" . |
381 | - (string) $classRepository, |
|
381 | + (string)$classRepository, |
|
382 | 382 | LOCK_EX |
383 | 383 | ); |
384 | 384 | } |