@@ -218,10 +218,10 @@ |
||
218 | 218 | $entity->nativeName = $data['native_name']; |
219 | 219 | $entity->de = $data['de']; |
220 | 220 | $entity->en = $data['en']; |
221 | - $entity->translationId = (int) $data['trans_id']; |
|
222 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
223 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
224 | - $entity->isTranslated = (bool) $data['is_translated']; |
|
221 | + $entity->translationId = (int)$data['trans_id']; |
|
222 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
223 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
224 | + $entity->isTranslated = (bool)$data['is_translated']; |
|
225 | 225 | |
226 | 226 | return $entity; |
227 | 227 | } |
@@ -181,9 +181,9 @@ |
||
181 | 181 | $entity->name = $data['name']; |
182 | 182 | $entity->de = $data['de']; |
183 | 183 | $entity->en = $data['en']; |
184 | - $entity->translationId = (int) $data['trans_id']; |
|
185 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
186 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
184 | + $entity->translationId = (int)$data['trans_id']; |
|
185 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
186 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
187 | 187 | $entity->sortDe = $data['sort_de']; |
188 | 188 | $entity->sortEn = $data['sort_en']; |
189 | 189 |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $databaseArray |
113 | 113 | ); |
114 | 114 | |
115 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
115 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
116 | 116 | |
117 | 117 | return $entity; |
118 | 118 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ['id' => $entity->id] |
141 | 141 | ); |
142 | 142 | |
143 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
143 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
144 | 144 | |
145 | 145 | return $entity; |
146 | 146 | } |
@@ -222,13 +222,13 @@ discard block |
||
222 | 222 | public function getEntityFromDatabaseArray(array $data) |
223 | 223 | { |
224 | 224 | $entity = new UserEntity(); |
225 | - $entity->id = (int) $data['user_id']; |
|
225 | + $entity->id = (int)$data['user_id']; |
|
226 | 226 | $entity->username = $data['username']; |
227 | 227 | $entity->password = $data['password']; |
228 | 228 | $entity->email = $data['email']; |
229 | - $entity->latitude = (double) $data['latitude']; |
|
230 | - $entity->longitude = (double) $data['longitude']; |
|
231 | - $entity->isActive = (bool) $data['is_active_flag']; |
|
229 | + $entity->latitude = (double)$data['latitude']; |
|
230 | + $entity->longitude = (double)$data['longitude']; |
|
231 | + $entity->isActive = (bool)$data['is_active_flag']; |
|
232 | 232 | $entity->firstname = $data['first_name']; |
233 | 233 | $entity->lastname = $data['last_name']; |
234 | 234 | $entity->country = $data['country']; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public static function fromEMail($email) |
28 | 28 | { |
29 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `email`='&1'", 0, $email); |
|
29 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `email`='&1'", 0, $email); |
|
30 | 30 | if ($userId === 0) { |
31 | 31 | return null; |
32 | 32 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function fromUsername($username) |
43 | 43 | { |
44 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
44 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
45 | 45 | if ($userId === 0) { |
46 | 46 | return null; |
47 | 47 | } |
@@ -28,14 +28,14 @@ |
||
28 | 28 | [':wp' => $_REQUEST['wp']] |
29 | 29 | ); |
30 | 30 | } else { |
31 | - $cacheId = isset($_REQUEST['cacheid']) ? (int) $_REQUEST['cacheid'] : -1; |
|
31 | + $cacheId = isset($_REQUEST['cacheid']) ? (int)$_REQUEST['cacheid'] : -1; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | $showHistory = false; |
35 | 35 | $error = ''; |
36 | 36 | |
37 | 37 | if ($cacheId >= 0 && |
38 | - $connection->fetchColumn('SELECT COUNT(*) FROM `caches` WHERE `cache_id`=:id',[':id' => $cacheId]) <> 1) |
|
38 | + $connection->fetchColumn('SELECT COUNT(*) FROM `caches` WHERE `cache_id`=:id', [':id' => $cacheId]) <> 1) |
|
39 | 39 | { |
40 | 40 | $error = $translate->t('Cache not found', '', '', 0); |
41 | 41 | } elseif ($cacheId > 0) { |
@@ -66,16 +66,16 @@ discard block |
||
66 | 66 | // current cache and log-counters |
67 | 67 | $tpl->assign( |
68 | 68 | 'count_hiddens', |
69 | - number1000((int) $connection->fetchColumn('SELECT COUNT(*) AS `hiddens` FROM `caches` WHERE `status` = 1')) |
|
69 | + number1000((int)$connection->fetchColumn('SELECT COUNT(*) AS `hiddens` FROM `caches` WHERE `status` = 1')) |
|
70 | 70 | ); |
71 | 71 | $tpl->assign( |
72 | 72 | 'count_founds', |
73 | - number1000((int) $connection->fetchColumn('SELECT COUNT(*) AS `founds` FROM `cache_logs` WHERE `type` = 1')) |
|
73 | + number1000((int)$connection->fetchColumn('SELECT COUNT(*) AS `founds` FROM `cache_logs` WHERE `type` = 1')) |
|
74 | 74 | ); |
75 | 75 | $tpl->assign( |
76 | 76 | 'count_users', |
77 | 77 | number1000( |
78 | - (int) $connection->fetchColumn( |
|
78 | + (int)$connection->fetchColumn( |
|
79 | 79 | 'SELECT COUNT(*) AS `users` |
80 | 80 | FROM ( |
81 | 81 | SELECT DISTINCT `user_id` |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | // get total event count for all countries |
94 | 94 | $tpl->assign( |
95 | 95 | 'total_events', |
96 | - (int) $connection->fetchColumn( |
|
96 | + (int)$connection->fetchColumn( |
|
97 | 97 | 'SELECT COUNT(*) |
98 | 98 | FROM `caches` |
99 | 99 | WHERE `type` = 6 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $options = array_merge($this->defaultOptions, $options); |
52 | 52 | |
53 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
53 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
54 | 54 | |
55 | 55 | if ($options['listClass']) { |
56 | 56 | $childrenClass[] = $options['listClass']; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | // create an array than can be imploded as a class list |
145 | - $class = (array) $item->getAttribute('class'); |
|
145 | + $class = (array)$item->getAttribute('class'); |
|
146 | 146 | |
147 | 147 | if ($options['itemClass']) { |
148 | 148 | $class[] = $options['itemClass']; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $html .= $this->renderLink($item, $options); |
184 | 184 | |
185 | 185 | // renders the embedded ul |
186 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
186 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
187 | 187 | if ($options['listClass']) { |
188 | 188 | $childrenClass[] = $options['listClass']; |
189 | 189 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | |
230 | 230 | protected function renderLinkElement(ItemInterface $item, array $options) |
231 | 231 | { |
232 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
232 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
233 | 233 | |
234 | 234 | if ($options['linkClass']) { |
235 | 235 | $childrenClass[] = $options['linkClass']; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | protected function renderSpanElement(ItemInterface $item, array $options) |
245 | 245 | { |
246 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
246 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
247 | 247 | |
248 | 248 | if ($options['textClass']) { |
249 | 249 | $childrenClass[] = $options['textClass']; |
@@ -37,6 +37,6 @@ |
||
37 | 37 | { |
38 | 38 | $value = str_replace(',', '.', $value); |
39 | 39 | |
40 | - return (float) $value; |
|
40 | + return (float)$value; |
|
41 | 41 | } |
42 | 42 | } |
@@ -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 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ['id' => $entity->id] |
117 | 117 | ); |
118 | 118 | |
119 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
119 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
120 | 120 | |
121 | 121 | return $entity; |
122 | 122 | } |
@@ -175,13 +175,13 @@ discard block |
||
175 | 175 | public function getEntityFromDatabaseArray(array $data) |
176 | 176 | { |
177 | 177 | $entity = new PageEntity(); |
178 | - $entity->id = (int) $data['id']; |
|
178 | + $entity->id = (int)$data['id']; |
|
179 | 179 | $entity->slug = $data['slug']; |
180 | 180 | $entity->metaKeywords = $data['meta_keywords']; |
181 | 181 | $entity->metaDescription = $data['meta_description']; |
182 | 182 | $entity->metaSocial = $data['meta_social']; |
183 | 183 | $entity->updatedAt = new DateTime($data['updated_at']); |
184 | - $entity->active = (bool) $data['active']; |
|
184 | + $entity->active = (bool)$data['active']; |
|
185 | 185 | |
186 | 186 | return $entity; |
187 | 187 | } |