@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | if (count($where) > 0) { |
| 54 | 54 | foreach ($where as $column => $value) { |
| 55 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 55 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $databaseArray |
| 90 | 90 | ); |
| 91 | 91 | |
| 92 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 92 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 93 | 93 | |
| 94 | 94 | return $entity; |
| 95 | 95 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | ['id' => $entity->id] |
| 118 | 118 | ); |
| 119 | 119 | |
| 120 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 120 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 121 | 121 | |
| 122 | 122 | return $entity; |
| 123 | 123 | } |
@@ -180,13 +180,13 @@ discard block |
||
| 180 | 180 | public function getEntityFromDatabaseArray(array $data) |
| 181 | 181 | { |
| 182 | 182 | $entity = new PageEntity(); |
| 183 | - $entity->id = (int) $data['id']; |
|
| 184 | - $entity->slug = (string) $data['slug']; |
|
| 185 | - $entity->metaKeywords = (string) $data['meta_keywords']; |
|
| 186 | - $entity->metaDescription = (string) $data['meta_description']; |
|
| 187 | - $entity->metaSocial = (string) $data['meta_social']; |
|
| 183 | + $entity->id = (int)$data['id']; |
|
| 184 | + $entity->slug = (string)$data['slug']; |
|
| 185 | + $entity->metaKeywords = (string)$data['meta_keywords']; |
|
| 186 | + $entity->metaDescription = (string)$data['meta_description']; |
|
| 187 | + $entity->metaSocial = (string)$data['meta_social']; |
|
| 188 | 188 | $entity->updatedAt = new DateTime($data['updated_at']); |
| 189 | - $entity->active = (bool) $data['active']; |
|
| 189 | + $entity->active = (bool)$data['active']; |
|
| 190 | 190 | |
| 191 | 191 | return $entity; |
| 192 | 192 | } |
@@ -175,15 +175,15 @@ |
||
| 175 | 175 | public function getEntityFromDatabaseArray(array $data) |
| 176 | 176 | { |
| 177 | 177 | $entity = new CountryEntity(); |
| 178 | - $entity->short = (string) $data['short']; |
|
| 179 | - $entity->name = (string) $data['name']; |
|
| 180 | - $entity->de = (string) $data['de']; |
|
| 181 | - $entity->en = (string) $data['en']; |
|
| 182 | - $entity->translationId = (int) $data['trans_id']; |
|
| 183 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
| 184 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
| 185 | - $entity->sortDe = (string) $data['sort_de']; |
|
| 186 | - $entity->sortEn = (string) $data['sort_en']; |
|
| 178 | + $entity->short = (string)$data['short']; |
|
| 179 | + $entity->name = (string)$data['name']; |
|
| 180 | + $entity->de = (string)$data['de']; |
|
| 181 | + $entity->en = (string)$data['en']; |
|
| 182 | + $entity->translationId = (int)$data['trans_id']; |
|
| 183 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
| 184 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
| 185 | + $entity->sortDe = (string)$data['sort_de']; |
|
| 186 | + $entity->sortEn = (string)$data['sort_en']; |
|
| 187 | 187 | |
| 188 | 188 | return $entity; |
| 189 | 189 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $databaseArray |
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 106 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 107 | 107 | |
| 108 | 108 | return $entity; |
| 109 | 109 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | ['id' => $entity->id] |
| 132 | 132 | ); |
| 133 | 133 | |
| 134 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 134 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 135 | 135 | |
| 136 | 136 | return $entity; |
| 137 | 137 | } |
@@ -216,16 +216,16 @@ discard block |
||
| 216 | 216 | public function getEntityFromDatabaseArray(array $data) |
| 217 | 217 | { |
| 218 | 218 | $entity = new UserEntity(); |
| 219 | - $entity->id = (int) $data['user_id']; |
|
| 220 | - $entity->username = (string) $data['username']; |
|
| 221 | - $entity->password = (string) $data['password']; |
|
| 222 | - $entity->email = (string) $data['email']; |
|
| 223 | - $entity->latitude = (double) $data['latitude']; |
|
| 224 | - $entity->longitude = (double) $data['longitude']; |
|
| 225 | - $entity->isActive = (bool) $data['is_active_flag']; |
|
| 226 | - $entity->firstname = (string) $data['first_name']; |
|
| 227 | - $entity->lastname = (string) $data['last_name']; |
|
| 228 | - $entity->country = (string) $data['country']; |
|
| 219 | + $entity->id = (int)$data['user_id']; |
|
| 220 | + $entity->username = (string)$data['username']; |
|
| 221 | + $entity->password = (string)$data['password']; |
|
| 222 | + $entity->email = (string)$data['email']; |
|
| 223 | + $entity->latitude = (double)$data['latitude']; |
|
| 224 | + $entity->longitude = (double)$data['longitude']; |
|
| 225 | + $entity->isActive = (bool)$data['is_active_flag']; |
|
| 226 | + $entity->firstname = (string)$data['first_name']; |
|
| 227 | + $entity->lastname = (string)$data['last_name']; |
|
| 228 | + $entity->country = (string)$data['country']; |
|
| 229 | 229 | $entity->language = strtolower($data['language']); |
| 230 | 230 | |
| 231 | 231 | return $entity; |
@@ -211,15 +211,15 @@ |
||
| 211 | 211 | public function getEntityFromDatabaseArray(array $data) |
| 212 | 212 | { |
| 213 | 213 | $entity = new LanguageEntity(); |
| 214 | - $entity->short = (string) strtolower($data['short']); |
|
| 215 | - $entity->name = (string) $data['name']; |
|
| 216 | - $entity->nativeName = (string) $data['native_name']; |
|
| 217 | - $entity->de = (string) $data['de']; |
|
| 218 | - $entity->en = (string) $data['en']; |
|
| 219 | - $entity->translationId = (int) $data['trans_id']; |
|
| 220 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
| 221 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
| 222 | - $entity->isTranslated = (bool) $data['is_translated']; |
|
| 214 | + $entity->short = (string)strtolower($data['short']); |
|
| 215 | + $entity->name = (string)$data['name']; |
|
| 216 | + $entity->nativeName = (string)$data['native_name']; |
|
| 217 | + $entity->de = (string)$data['de']; |
|
| 218 | + $entity->en = (string)$data['en']; |
|
| 219 | + $entity->translationId = (int)$data['trans_id']; |
|
| 220 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
| 221 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
| 222 | + $entity->isTranslated = (bool)$data['is_translated']; |
|
| 223 | 223 | |
| 224 | 224 | return $entity; |
| 225 | 225 | } |
@@ -151,17 +151,17 @@ |
||
| 151 | 151 | public static function getConflictingAttribIds($attribId) |
| 152 | 152 | { |
| 153 | 153 | static $conflicts = [ |
| 154 | - [1, 38], // only at night - 24/7 |
|
| 155 | - [1, 40], // only at night - only by day |
|
| 156 | - [24, 25], // near the parking area - long walk |
|
| 157 | - [24, 27], // near the parking area - hilly area |
|
| 158 | - [24, 29], // near the parking area - swimming required |
|
| 159 | - [24, 50], // near the parking area - cave equipment |
|
| 160 | - [24, 51], // near the parking area - diving equipment |
|
| 161 | - [24, 52], // near the parking area - watercraft |
|
| 162 | - [38, 39], // 24/7 - only at specified times |
|
| 163 | - [38, 40], // 24/7 - only by day |
|
| 164 | - [42, 43], // all seasons - breeding season |
|
| 154 | + [1, 38], // only at night - 24/7 |
|
| 155 | + [1, 40], // only at night - only by day |
|
| 156 | + [24, 25], // near the parking area - long walk |
|
| 157 | + [24, 27], // near the parking area - hilly area |
|
| 158 | + [24, 29], // near the parking area - swimming required |
|
| 159 | + [24, 50], // near the parking area - cave equipment |
|
| 160 | + [24, 51], // near the parking area - diving equipment |
|
| 161 | + [24, 52], // near the parking area - watercraft |
|
| 162 | + [38, 39], // 24/7 - only at specified times |
|
| 163 | + [38, 40], // 24/7 - only by day |
|
| 164 | + [42, 43], // all seasons - breeding season |
|
| 165 | 165 | [42, 60] // all seassons - only during specified seasons |
| 166 | 166 | ]; |
| 167 | 167 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $config->set( |
| 64 | 64 | 'HTML.ForbiddenElements', |
| 65 | 65 | [ |
| 66 | - 'basefont', // workaround for HTMLPurifier bug, which allows this in the <body> |
|
| 66 | + 'basefont', // workaround for HTMLPurifier bug, which allows this in the <body> |
|
| 67 | 67 | ] |
| 68 | 68 | ); |
| 69 | 69 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // add attributes |
| 99 | 99 | $def->addAttribute('a', 'rel', 'CDATA'); |
| 100 | 100 | $def->addAttribute('img', 'usemap', 'CDATA'); |
| 101 | - $def->addAttribute('map', 'name', 'CDATA'); // workaround for HTMLPurifer bug |
|
| 101 | + $def->addAttribute('map', 'name', 'CDATA'); // workaround for HTMLPurifer bug |
|
| 102 | 102 | |
| 103 | 103 | // create parent object with config |
| 104 | 104 | parent::__construct($config); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $process = new Process($cmd, $this->rootPath, null, null, 9600); |
| 46 | - $process->run(function ($type, $buffer) { |
|
| 46 | + $process->run(function($type, $buffer) { |
|
| 47 | 47 | echo $buffer; |
| 48 | 48 | }); |
| 49 | 49 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | protected function execute(InputInterface $input, OutputInterface $output) |
| 48 | 48 | { |
| 49 | - require_once __DIR__.'/../../../okapi/autoload.php'; |
|
| 49 | + require_once __DIR__ . '/../../../okapi/autoload.php'; |
|
| 50 | 50 | Okapi::execute_prerequest_cronjobs(); |
| 51 | 51 | Okapi::execute_cron5_cronjobs(); |
| 52 | 52 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $jpegQuality = 80; |
| 12 | 12 | $fontFile = __DIR__ . '/resource2/' . $opt['template']['style'] . '/fonts/dejavu/ttf/DejaVuSans.ttf'; |
| 13 | 13 | |
| 14 | -$userId = isset($_REQUEST['userid']) ? (int) $_REQUEST['userid'] : 0; |
|
| 14 | +$userId = isset($_REQUEST['userid']) ? (int)$_REQUEST['userid'] : 0; |
|
| 15 | 15 | $lang = isset($_REQUEST['lang']) ? mb_strtoupper($_REQUEST['lang']) : $opt['template']['locale']; |
| 16 | 16 | |
| 17 | 17 | if (!isset($opt['locale'][$lang])) { |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $connection = AppKernel::Container()->get(Connection::class); |
| 23 | 23 | |
| 24 | 24 | $fileName = __DIR__ . '/images/statpics/statpic' . $userId . $lang . '.jpg'; |
| 25 | -$userStatisticPicture = (int) $connection->createQueryBuilder() |
|
| 25 | +$userStatisticPicture = (int)$connection->createQueryBuilder() |
|
| 26 | 26 | ->select('COUNT(*)') |
| 27 | 27 | ->from('user_statpic') |
| 28 | 28 | ->where('user_id = :userId') |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | if (is_array($userData)) { |
| 50 | 50 | $username = $userData['username']; |
| 51 | - $found = (int) $userData['found']; |
|
| 52 | - $hidden = (int) $userData['hidden']; |
|
| 53 | - $logo = (int) $userData['statpic_logo']; |
|
| 54 | - $logoText = (int) $userData['statpic_text']; |
|
| 51 | + $found = (int)$userData['found']; |
|
| 52 | + $hidden = (int)$userData['hidden']; |
|
| 53 | + $logo = (int)$userData['statpic_logo']; |
|
| 54 | + $logoText = (int)$userData['statpic_text']; |
|
| 55 | 55 | |
| 56 | 56 | $textCounterStatistic = $translate->t('Finds: %1 Hidden: %2', '', '', 0, '', 0, $lang); |
| 57 | 57 | $textCounterStatistic = str_replace(['%1', '%2'], [$found, $hidden], $textCounterStatistic); |