@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
6 | 6 | |
7 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
7 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
8 | 8 | $containerConfigurator->extension('framework', [ |
9 | 9 | 'cache' => null |
10 | 10 | ]); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
6 | 6 | |
7 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
7 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
8 | 8 | $containerConfigurator->extension('doctrine_migrations', [ |
9 | 9 | 'migrations_paths' => [ |
10 | 10 | 'OcMigrations' => '%kernel.project_dir%/migrations' |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; |
8 | 8 | use function Symfony\Component\DependencyInjection\Loader\Configurator\service; |
9 | 9 | |
10 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
10 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
11 | 11 | $services = $containerConfigurator->services(); |
12 | 12 | |
13 | 13 | $services->defaults() |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; |
6 | 6 | |
7 | -return static function (RoutingConfigurator $routingConfigurator): void { |
|
7 | +return static function(RoutingConfigurator $routingConfigurator): void { |
|
8 | 8 | $routingConfigurator->import('@FrameworkBundle/Resources/config/routing/errors.xml') |
9 | 9 | ->prefix('/_error'); |
10 | 10 | }; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; |
6 | 6 | |
7 | -return static function (RoutingConfigurator $routingConfigurator): void { |
|
7 | +return static function(RoutingConfigurator $routingConfigurator): void { |
|
8 | 8 | $routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/wdt.xml') |
9 | 9 | ->prefix('/_wdt'); |
10 | 10 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; |
6 | 6 | |
7 | -return static function (RoutingConfigurator $routingConfigurator): void { |
|
7 | +return static function(RoutingConfigurator $routingConfigurator): void { |
|
8 | 8 | $routingConfigurator->import('../../src/Controller/App', 'annotation') |
9 | 9 | ->namePrefix('app_'); |
10 | 10 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $load_query = false; |
89 | 89 | $show_lastsearchbutton = true; |
90 | 90 | |
91 | -$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : ''; |
|
91 | +$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : ''; |
|
92 | 92 | $added_waypoints = 0; |
93 | 93 | |
94 | 94 | if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult'])) { // Ocprop: showresult, queryid |
@@ -255,20 +255,20 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | // get the search options parameters and store them in the queries table (to view "the next page") |
258 | - $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? (int) $_REQUEST['f_userowner'] : 0; // Ocprop |
|
259 | - $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? (int) $_REQUEST['f_userfound'] : 0; // Ocprop |
|
260 | - $options['f_unpublished'] = isset($_REQUEST['f_unpublished']) ? (int) $_REQUEST['f_unpublished'] : 0; |
|
261 | - $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? (int) $_REQUEST['f_disabled'] : 0; |
|
262 | - $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? (int) $_REQUEST['f_inactive'] : 1; // Ocprop |
|
258 | + $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? (int)$_REQUEST['f_userowner'] : 0; // Ocprop |
|
259 | + $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? (int)$_REQUEST['f_userfound'] : 0; // Ocprop |
|
260 | + $options['f_unpublished'] = isset($_REQUEST['f_unpublished']) ? (int)$_REQUEST['f_unpublished'] : 0; |
|
261 | + $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? (int)$_REQUEST['f_disabled'] : 0; |
|
262 | + $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? (int)$_REQUEST['f_inactive'] : 1; // Ocprop |
|
263 | 263 | // f_inactive formerly was used for both, archived and disabled caches. |
264 | 264 | // After adding the separate f_disabled option, it is used only for archived |
265 | 265 | // caches, but keeps its name for compatibility with existing stored or |
266 | 266 | // external searches. |
267 | - $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? (int) $_REQUEST['f_ignored'] : 1; |
|
268 | - $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? (int) $_REQUEST['f_otherPlatforms'] : 0; |
|
269 | - $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? (int) $_REQUEST['f_geokrets'] : 0; |
|
270 | - $options['expert'] = isset($_REQUEST['expert']) ? (int) $_REQUEST['expert'] : 0; // Ocprop: 0 |
|
271 | - $options['showresult'] = isset($_REQUEST['showresult']) ? (int) $_REQUEST['showresult'] : 0; |
|
267 | + $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? (int)$_REQUEST['f_ignored'] : 1; |
|
268 | + $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? (int)$_REQUEST['f_otherPlatforms'] : 0; |
|
269 | + $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? (int)$_REQUEST['f_geokrets'] : 0; |
|
270 | + $options['expert'] = isset($_REQUEST['expert']) ? (int)$_REQUEST['expert'] : 0; // Ocprop: 0 |
|
271 | + $options['showresult'] = isset($_REQUEST['showresult']) ? (int)$_REQUEST['showresult'] : 0; |
|
272 | 272 | $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML |
273 | 273 | $options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false; |
274 | 274 | |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | } elseif (isset($_REQUEST['searchbyowner'])) { // Ocprop |
323 | 323 | $options['searchtype'] = 'byowner'; |
324 | 324 | |
325 | - $options['ownerid'] = isset($_REQUEST['ownerid']) ? (int) $_REQUEST['ownerid'] : 0; |
|
325 | + $options['ownerid'] = isset($_REQUEST['ownerid']) ? (int)$_REQUEST['ownerid'] : 0; |
|
326 | 326 | $options['owner'] = isset($_REQUEST['owner']) ? stripslashes($_REQUEST['owner']) : ''; |
327 | 327 | |
328 | 328 | if (isset($options['owner'])) { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | } elseif (isset($_REQUEST['searchbyfinder'])) { // Ocprop |
339 | 339 | $options['searchtype'] = 'byfinder'; |
340 | 340 | |
341 | - $options['finderid'] = isset($_REQUEST['finderid']) ? (int) $_REQUEST['finderid'] : 0; |
|
341 | + $options['finderid'] = isset($_REQUEST['finderid']) ? (int)$_REQUEST['finderid'] : 0; |
|
342 | 342 | $options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : ''; |
343 | 343 | $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop |
344 | 344 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $options['lon_min'] = isset($_REQUEST['lon_min']) ? $_REQUEST['lon_min'] : 0; |
394 | 394 | } |
395 | 395 | |
396 | - $options['distance'] = isset($_REQUEST['distance']) ? (int) $_REQUEST['distance'] : 0; |
|
396 | + $options['distance'] = isset($_REQUEST['distance']) ? (int)$_REQUEST['distance'] : 0; |
|
397 | 397 | } elseif (isset($_REQUEST['searchbyfulltext'])) { |
398 | 398 | $options['searchtype'] = 'byfulltext'; |
399 | 399 | |
@@ -460,11 +460,11 @@ discard block |
||
460 | 460 | $options['cachetype'] = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] : ''; |
461 | 461 | |
462 | 462 | $options['cachesize'] = isset($_REQUEST['cachesize']) ? $_REQUEST['cachesize'] : ''; |
463 | - $options['difficultymin'] = isset($_REQUEST['difficultymin']) ? (int) $_REQUEST['difficultymin'] : 0; |
|
464 | - $options['difficultymax'] = isset($_REQUEST['difficultymax']) ? (int) $_REQUEST['difficultymax'] : 0; |
|
465 | - $options['terrainmin'] = isset($_REQUEST['terrainmin']) ? (int) $_REQUEST['terrainmin'] : 0; |
|
466 | - $options['terrainmax'] = isset($_REQUEST['terrainmax']) ? (int) $_REQUEST['terrainmax'] : 0; |
|
467 | - $options['recommendationmin'] = isset($_REQUEST['recommendationmin']) ? (int) $_REQUEST['recommendationmin'] : 0; |
|
463 | + $options['difficultymin'] = isset($_REQUEST['difficultymin']) ? (int)$_REQUEST['difficultymin'] : 0; |
|
464 | + $options['difficultymax'] = isset($_REQUEST['difficultymax']) ? (int)$_REQUEST['difficultymax'] : 0; |
|
465 | + $options['terrainmin'] = isset($_REQUEST['terrainmin']) ? (int)$_REQUEST['terrainmin'] : 0; |
|
466 | + $options['terrainmax'] = isset($_REQUEST['terrainmax']) ? (int)$_REQUEST['terrainmax'] : 0; |
|
467 | + $options['recommendationmin'] = isset($_REQUEST['recommendationmin']) ? (int)$_REQUEST['recommendationmin'] : 0; |
|
468 | 468 | |
469 | 469 | if (in_array($options['searchtype'], ['byort', 'byplz', 'bydistance', 'bywaypoint'])) { |
470 | 470 | // For distance-based searches, sort by distance instead of name. |
@@ -1297,11 +1297,11 @@ discard block |
||
1297 | 1297 | |
1298 | 1298 | //add selected caches to selected cachelist |
1299 | 1299 | if (isset($_REQUEST['addToList']) && isset($_REQUEST['addCache']) && isset($_REQUEST['selectCachelist'])) { |
1300 | - $list_caches_= $_REQUEST['addToList']; |
|
1300 | + $list_caches_ = $_REQUEST['addToList']; |
|
1301 | 1301 | $added_waypoints = addToList($list_caches); |
1302 | - $addCachelist= cachelist::getListById((int) $_REQUEST['selectCachelist']); // null for invalid ID |
|
1302 | + $addCachelist = cachelist::getListById((int)$_REQUEST['selectCachelist']); // null for invalid ID |
|
1303 | 1303 | } elseif (isset($_REQUEST['addToList'])) { |
1304 | - $addCachelist= cachelist::getListById((int) $_REQUEST['selectCachelist']); // null for invalid ID |
|
1304 | + $addCachelist = cachelist::getListById((int)$_REQUEST['selectCachelist']); // null for invalid ID |
|
1305 | 1305 | $error_addCaches = true; |
1306 | 1306 | } |
1307 | 1307 | |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | $tpl->assign('searchtype_byname', $options['searchtype'] == 'byname'); |
1774 | 1774 | |
1775 | 1775 | // distance |
1776 | - $tpl->assign('distance', isset($options['distance']) ? (int) $options['distance'] : DEFAULT_SEARCH_DISTANCE); |
|
1776 | + $tpl->assign('distance', isset($options['distance']) ? (int)$options['distance'] : DEFAULT_SEARCH_DISTANCE); |
|
1777 | 1777 | |
1778 | 1778 | if (!isset($options['unit'])) { |
1779 | 1779 | $options['unit'] = DEFAULT_DISTANCE_UNIT; |
@@ -1492,8 +1492,7 @@ |
||
1492 | 1492 | if (isset($_REQUEST['count'])) { // Ocprop |
1493 | 1493 | if ($_REQUEST['count'] === 'max') { |
1494 | 1494 | $count = 'max'; |
1495 | - } |
|
1496 | - else |
|
1495 | + } else |
|
1497 | 1496 | { |
1498 | 1497 | $count = floor($_REQUEST['count'] + 0); |
1499 | 1498 | } |
@@ -20,8 +20,8 @@ |
||
20 | 20 | if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { |
21 | 21 | Request::setTrustedProxies( |
22 | 22 | explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR |
23 | - ^ Request::HEADER_X_FORWARDED_PROTO |
|
24 | - ^ Request::HEADER_X_FORWARDED_PORT |
|
23 | + ^ Request::HEADER_X_FORWARDED_PROTO |
|
24 | + ^ Request::HEADER_X_FORWARDED_PORT |
|
25 | 25 | ); |
26 | 26 | } |
27 | 27 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | Request::setTrustedHosts([$trustedHosts]); |
30 | 30 | } |
31 | 31 | |
32 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
32 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
33 | 33 | $request = Request::createFromGlobals(); |
34 | 34 | $response = $kernel->handle($request); |
35 | 35 | $response->send(); |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | /** @var Connection $connection */ |
25 | 25 | $connection = AppKernel::Container()->get(Connection::class); |
26 | 26 | |
27 | -$id = (int) isset($_REQUEST['id']) ? $_REQUEST['id'] : 0; |
|
28 | -$rId = (int) isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0; |
|
29 | -$cacheId = (int) isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0; |
|
30 | -$ownerId = (int) isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0; |
|
27 | +$id = (int)isset($_REQUEST['id']) ? $_REQUEST['id'] : 0; |
|
28 | +$rId = (int)isset($_REQUEST['rid']) ? $_REQUEST['rid'] : 0; |
|
29 | +$cacheId = (int)isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0; |
|
30 | +$ownerId = (int)isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0; |
|
31 | 31 | |
32 | 32 | $reportData = $connection |
33 | 33 | ->fetchAssociative( |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | ['id' => $rId] |
38 | 38 | ); |
39 | 39 | |
40 | -$reporterId = (int) $reportData['userid']; |
|
41 | -$adminId = (int) $reportData['adminid']; |
|
40 | +$reporterId = (int)$reportData['userid']; |
|
41 | +$adminId = (int)$reportData['adminid']; |
|
42 | 42 | $age = $reportData['age']; |
43 | 43 | |
44 | 44 | if (isset($_REQUEST['savecomment'])) { |