@@ -38,8 +38,7 @@ |
||
38 | 38 | ) { |
39 | 39 | $this->execute( 'DROP TABLE "mshop_index_text"' ); |
40 | 40 | $this->status( 'done' ); |
41 | - } |
|
42 | - else |
|
41 | + } else |
|
43 | 42 | { |
44 | 43 | $this->status( 'OK' ); |
45 | 44 | } |
@@ -156,9 +156,12 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function createItem( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface |
158 | 158 | { |
159 | - try { |
|
159 | + try |
|
160 | + { |
|
160 | 161 | $values['log.siteid'] = $this->getContext()->getLocale()->getSiteId(); |
161 | - } catch( \Exception $e ) { |
|
162 | + } |
|
163 | + catch( \Exception $e ) |
|
164 | + { |
|
162 | 165 | $values['log.siteid'] = null; |
163 | 166 | } |
164 | 167 | |
@@ -181,9 +184,12 @@ discard block |
||
181 | 184 | |
182 | 185 | $context = $this->getContext(); |
183 | 186 | |
184 | - try { |
|
187 | + try |
|
188 | + { |
|
185 | 189 | $siteid = $context->getLocale()->getSiteId(); |
186 | - } catch( \Exception $e ) { |
|
190 | + } |
|
191 | + catch( \Exception $e ) |
|
192 | + { |
|
187 | 193 | $siteid = ''; |
188 | 194 | } |
189 | 195 | |
@@ -235,8 +241,7 @@ discard block |
||
235 | 241 | */ |
236 | 242 | $path = 'madmin/log/manager/standard/insert'; |
237 | 243 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
238 | - } |
|
239 | - else |
|
244 | + } else |
|
240 | 245 | { |
241 | 246 | /** madmin/log/manager/standard/update/mysql |
242 | 247 | * Updates an existing log record in the database |
@@ -214,9 +214,12 @@ |
||
214 | 214 | { |
215 | 215 | if( self::$node === null ) |
216 | 216 | { |
217 | - try { |
|
217 | + try |
|
218 | + { |
|
218 | 219 | self::$node = random_bytes( 6 ); |
219 | - } catch( \Throwable $t ) { |
|
220 | + } |
|
221 | + catch( \Throwable $t ) |
|
222 | + { |
|
220 | 223 | if( function_exists( 'openssl_random_pseudo_bytes' ) ) { |
221 | 224 | self::$node = openssl_random_pseudo_bytes( 6 ); |
222 | 225 | } else { |
@@ -285,8 +285,7 @@ |
||
285 | 285 | |
286 | 286 | $params[] = $list; |
287 | 287 | } |
288 | - } |
|
289 | - else |
|
288 | + } else |
|
290 | 289 | { |
291 | 290 | $params[] = $this->escape( '==', $this->getParamType( $string ), $string ); |
292 | 291 | } |
@@ -60,8 +60,7 @@ |
||
60 | 60 | $sort = 'mindte_ft.RANK'; |
61 | 61 | |
62 | 62 | $func = $this->getFunctionRelevance(); |
63 | - } |
|
64 | - else |
|
63 | + } else |
|
65 | 64 | { |
66 | 65 | $search = ':site AND mindte."langid" = $1 AND CHARINDEX( $2, content )'; |
67 | 66 | $sort = '-CHARINDEX( $2, content )'; |
@@ -306,8 +306,7 @@ |
||
306 | 306 | if( empty( $search->getSortations() ) && ( $attribute = reset( $attributes ) ) !== false ) |
307 | 307 | { |
308 | 308 | $search = ( clone $search )->setSortations( [$search->sort( '+', $attribute->getCode() )] ); |
309 | - } |
|
310 | - elseif( !empty( $search->getSortations() ) ) |
|
309 | + } elseif( !empty( $search->getSortations() ) ) |
|
311 | 310 | { |
312 | 311 | $names = $search->translate( $search->getSortations(), [], $funcs ); |
313 | 312 | $cols = $search->translate( $search->getSortations(), $translations, $funcs ); |
@@ -121,11 +121,13 @@ |
||
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
124 | - if( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) // use billing address if no delivery address is available |
|
124 | + if( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) { |
|
125 | + // use billing address if no delivery address is available |
|
125 | 126 | { |
126 | 127 | foreach( $addresses as $address ) |
127 | 128 | { |
128 | 129 | $code = strtoupper( $address->getCountryId() ); |
130 | + } |
|
129 | 131 | |
130 | 132 | if( $this->checkCountryCode( $code, 'country.delivery-include' ) === false |
131 | 133 | || $this->checkCountryCode( $code, 'country.delivery-exclude' ) === true |