@@ -89,8 +89,7 @@ |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $this->status( 'added' ); |
92 | - } |
|
93 | - else |
|
92 | + } else |
|
94 | 93 | { |
95 | 94 | $this->status( 'removed' ); |
96 | 95 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | if( $value === '1' ) |
75 | 75 | { |
76 | 76 | $ds = DIRECTORY_SEPARATOR; |
77 | - $path = __DIR__ . $ds . 'data' . $ds . 'demo-coupon.php'; |
|
77 | + $path = __DIR__.$ds.'data'.$ds.'demo-coupon.php'; |
|
78 | 78 | |
79 | 79 | if( ( $data = include( $path ) ) == false ) { |
80 | 80 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for coupon domain', $path ) ); |
@@ -75,8 +75,7 @@ |
||
75 | 75 | $this->saveCustomerItems( $data ); |
76 | 76 | |
77 | 77 | $this->status( 'added' ); |
78 | - } |
|
79 | - else |
|
78 | + } else |
|
80 | 79 | { |
81 | 80 | $this->status( 'removed' ); |
82 | 81 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | if( $value === '1' ) |
76 | 76 | { |
77 | 77 | $ds = DIRECTORY_SEPARATOR; |
78 | - $path = __DIR__ . $ds . 'data' . $ds . 'demo-customer.php'; |
|
78 | + $path = __DIR__.$ds.'data'.$ds.'demo-customer.php'; |
|
79 | 79 | |
80 | 80 | if( ( $data = include( $path ) ) == false ) { |
81 | 81 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) ); |
@@ -77,8 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $this->addDemoData(); |
79 | 79 | $this->status( 'added' ); |
80 | - } |
|
81 | - else |
|
80 | + } else |
|
82 | 81 | { |
83 | 82 | $this->status( 'removed' ); |
84 | 83 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $this->removeItems( $item->getId(), 'product/lists', 'product', 'text' ); |
70 | 70 | $this->removeListItems( $item->getId(), 'product/lists', 'product' ); |
71 | 71 | |
72 | - $productCodes[] = $item->getCode(); |
|
72 | + $productCodes[] = $item->getCode(); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $this->removeStockItems( $productCodes ); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | protected function addDemoData() |
97 | 97 | { |
98 | 98 | $ds = DIRECTORY_SEPARATOR; |
99 | - $path = __DIR__ . $ds . 'data' . $ds . 'demo-product.php'; |
|
99 | + $path = __DIR__.$ds.'data'.$ds.'demo-product.php'; |
|
100 | 100 | |
101 | 101 | if( ( $data = include( $path ) ) == false ) { |
102 | 102 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for product domain', $path ) ); |
@@ -201,9 +201,12 @@ discard block |
||
201 | 201 | ); |
202 | 202 | $dbm = $context->getDatabaseManager(); |
203 | 203 | |
204 | - try { |
|
204 | + try |
|
205 | + { |
|
205 | 206 | $this->object = \Aimeos\MW\Cache\Factory::createManager( $name, $config, $dbm ); |
206 | - } catch( \Exception $e ) { |
|
207 | + } |
|
208 | + catch( \Exception $e ) |
|
209 | + { |
|
207 | 210 | $this->object = \Aimeos\MW\Cache\Factory::createManager( 'DB', $config, $dbm ); |
208 | 211 | } |
209 | 212 | } |
@@ -265,9 +268,12 @@ discard block |
||
265 | 268 | */ |
266 | 269 | public function createItem() |
267 | 270 | { |
268 | - try { |
|
271 | + try |
|
272 | + { |
|
269 | 273 | $values = array( 'siteid' => $this->getContext()->getLocale()->getSiteId() ); |
270 | - } catch( \Exception $e ) { |
|
274 | + } |
|
275 | + catch( \Exception $e ) |
|
276 | + { |
|
271 | 277 | $values = array( 'siteid' => null ); |
272 | 278 | } |
273 | 279 |
@@ -243,8 +243,7 @@ |
||
243 | 243 | $stmt->bind( 8, $pos, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
244 | 244 | |
245 | 245 | $stmt->execute()->finish(); |
246 | - } |
|
247 | - else |
|
246 | + } else |
|
248 | 247 | { |
249 | 248 | $sql = $this->getSqlConfig( $cfgPath . 'getposmax' ); |
250 | 249 |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function aggregate( \Aimeos\MW\Criteria\Iface $search, $key ) |
64 | 64 | { |
65 | 65 | $required = array( trim( $this->prefix, '.' ) ); |
66 | - return $this->aggregateBase( $search, $key, $this->getConfigPath() . 'aggregate', $required ); |
|
66 | + return $this->aggregateBase( $search, $key, $this->getConfigPath().'aggregate', $required ); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function createItem() |
76 | 76 | { |
77 | 77 | $values = array( |
78 | - $this->prefix . 'siteid' => $this->getContext()->getLocale()->getSiteId() |
|
78 | + $this->prefix.'siteid' => $this->getContext()->getLocale()->getSiteId() |
|
79 | 79 | ); |
80 | 80 | return $this->createItemBase( $values ); |
81 | 81 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $time = date( 'Y-m-d H:i:s' ); |
115 | - $stmt = $this->getCachedStatement( $conn, $this->getConfigPath() . $type ); |
|
115 | + $stmt = $this->getCachedStatement( $conn, $this->getConfigPath().$type ); |
|
116 | 116 | |
117 | 117 | $stmt->bind( 1, $item->getParentId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
118 | 118 | $stmt->bind( 2, $item->getTypeId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | if( $fetch === true ) |
140 | 140 | { |
141 | 141 | if( $id === null ) { |
142 | - $path = $this->getConfigPath() . 'newid'; |
|
142 | + $path = $this->getConfigPath().'newid'; |
|
143 | 143 | $item->setId( $this->newId( $conn, $path ) ); |
144 | 144 | } else { |
145 | 145 | $item->setId( $id ); // modified false |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function deleteItems( array $ids ) |
165 | 165 | { |
166 | - $this->deleteItemsBase( $ids, $this->getConfigPath() . 'delete' ); |
|
166 | + $this->deleteItemsBase( $ids, $this->getConfigPath().'delete' ); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | { |
236 | 236 | $newpos = $pos; |
237 | 237 | |
238 | - $sql = $this->getSqlConfig( $cfgPath . 'move' ); |
|
238 | + $sql = $this->getSqlConfig( $cfgPath.'move' ); |
|
239 | 239 | |
240 | 240 | $stmt = $conn->create( $sql ); |
241 | 241 | $stmt->bind( 1, +1, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | } |
252 | 252 | else |
253 | 253 | { |
254 | - $sql = $this->getSqlConfig( $cfgPath . 'getposmax' ); |
|
254 | + $sql = $this->getSqlConfig( $cfgPath.'getposmax' ); |
|
255 | 255 | |
256 | 256 | $stmt = $conn->create( $sql ); |
257 | 257 | |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | } |
271 | 271 | |
272 | - $sql = $this->getSqlConfig( $cfgPath . 'updatepos' ); |
|
272 | + $sql = $this->getSqlConfig( $cfgPath.'updatepos' ); |
|
273 | 273 | |
274 | 274 | $stmt = $conn->create( $sql ); |
275 | 275 | $stmt->bind( 1, $newpos, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | if( $oldpos > 0 ) |
288 | 288 | { |
289 | - $sql = $this->getSqlConfig( $cfgPath . 'move' ); |
|
289 | + $sql = $this->getSqlConfig( $cfgPath.'move' ); |
|
290 | 290 | |
291 | 291 | $stmt = $conn->create( $sql ); |
292 | 292 | $stmt->bind( 1, -1, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
@@ -336,8 +336,8 @@ discard block |
||
336 | 336 | } |
337 | 337 | |
338 | 338 | $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; |
339 | - $cfgPathSearch = $this->getConfigPath() . 'search'; |
|
340 | - $cfgPathCount = $this->getConfigPath() . 'count'; |
|
339 | + $cfgPathSearch = $this->getConfigPath().'search'; |
|
340 | + $cfgPathCount = $this->getConfigPath().'count'; |
|
341 | 341 | |
342 | 342 | $name = trim( $this->prefix, '.' ); |
343 | 343 | $required = array( $name ); |
@@ -346,12 +346,12 @@ discard block |
||
346 | 346 | |
347 | 347 | while( ( $row = $results->fetch() ) !== false ) |
348 | 348 | { |
349 | - if( ( $row[$this->prefix . 'config'] = json_decode( $row[$this->prefix . 'config'], true ) ) === null ) { |
|
350 | - $row[$this->prefix . 'config'] = []; |
|
349 | + if( ( $row[$this->prefix.'config'] = json_decode( $row[$this->prefix.'config'], true ) ) === null ) { |
|
350 | + $row[$this->prefix.'config'] = []; |
|
351 | 351 | } |
352 | 352 | |
353 | - $map[$row[$this->prefix . 'id']] = $row; |
|
354 | - $typeIds[$row[$this->prefix . 'typeid']] = null; |
|
353 | + $map[$row[$this->prefix.'id']] = $row; |
|
354 | + $typeIds[$row[$this->prefix.'typeid']] = null; |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | $dbm->release( $conn, $dbname ); |
@@ -366,19 +366,19 @@ discard block |
||
366 | 366 | { |
367 | 367 | $typeManager = $this->getObject()->getSubManager( 'type' ); |
368 | 368 | $typeSearch = $typeManager->createSearch(); |
369 | - $typeSearch->setConditions( $typeSearch->compare( '==', $name . '.type.id', array_keys( $typeIds ) ) ); |
|
369 | + $typeSearch->setConditions( $typeSearch->compare( '==', $name.'.type.id', array_keys( $typeIds ) ) ); |
|
370 | 370 | $typeSearch->setSlice( 0, $search->getSliceSize() ); |
371 | 371 | $typeItems = $typeManager->searchItems( $typeSearch ); |
372 | 372 | |
373 | 373 | foreach( $map as $id => $row ) |
374 | 374 | { |
375 | - if( isset( $typeItems[$row[$this->prefix . 'typeid']] ) ) |
|
375 | + if( isset( $typeItems[$row[$this->prefix.'typeid']] ) ) |
|
376 | 376 | { |
377 | - $row[$this->prefix . 'type'] = $typeItems[$row[$this->prefix . 'typeid']]->getCode(); |
|
378 | - $row[$this->prefix . 'typename'] = $typeItems[$row[$this->prefix . 'typeid']]->getName(); |
|
377 | + $row[$this->prefix.'type'] = $typeItems[$row[$this->prefix.'typeid']]->getCode(); |
|
378 | + $row[$this->prefix.'typename'] = $typeItems[$row[$this->prefix.'typeid']]->getName(); |
|
379 | 379 | } |
380 | 380 | |
381 | - $items[$row[$this->prefix . 'id']] = $this->createItemBase( $row ); |
|
381 | + $items[$row[$this->prefix.'id']] = $this->createItemBase( $row ); |
|
382 | 382 | } |
383 | 383 | } |
384 | 384 | |
@@ -417,8 +417,8 @@ discard block |
||
417 | 417 | } |
418 | 418 | |
419 | 419 | $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; |
420 | - $cfgPathSearch = $this->getConfigPath() . 'search'; |
|
421 | - $cfgPathCount = $this->getConfigPath() . 'count'; |
|
420 | + $cfgPathSearch = $this->getConfigPath().'search'; |
|
421 | + $cfgPathCount = $this->getConfigPath().'count'; |
|
422 | 422 | |
423 | 423 | $name = trim( $this->prefix, '.' ); |
424 | 424 | $required = array( $name ); |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level ); |
427 | 427 | |
428 | 428 | while( ( $row = $results->fetch() ) !== false ) { |
429 | - $map[$row[$this->prefix . 'domain']][] = $row[$this->prefix . 'refid']; |
|
429 | + $map[$row[$this->prefix.'domain']][] = $row[$this->prefix.'refid']; |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | $dbm->release( $conn, $dbname ); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | $search = $manager->createSearch( true ); |
446 | 446 | $expr = array( |
447 | - $search->compare( '==', str_replace( '/', '.', $domain ) . '.id', $list ), |
|
447 | + $search->compare( '==', str_replace( '/', '.', $domain ).'.id', $list ), |
|
448 | 448 | $search->getConditions(), |
449 | 449 | ); |
450 | 450 | $search->setConditions( $search->combine( '&&', $expr ) ); |
@@ -476,13 +476,13 @@ discard block |
||
476 | 476 | $expr[] = $object->getConditions(); |
477 | 477 | |
478 | 478 | $exprTwo = []; |
479 | - $exprTwo[] = $object->compare( '<=', $prefix . '.datestart', $curDate ); |
|
480 | - $exprTwo[] = $object->compare( '==', $prefix . '.datestart', null ); |
|
479 | + $exprTwo[] = $object->compare( '<=', $prefix.'.datestart', $curDate ); |
|
480 | + $exprTwo[] = $object->compare( '==', $prefix.'.datestart', null ); |
|
481 | 481 | $expr[] = $object->combine( '||', $exprTwo ); |
482 | 482 | |
483 | 483 | $exprTwo = []; |
484 | - $exprTwo[] = $object->compare( '>=', $prefix . '.dateend', $curDate ); |
|
485 | - $exprTwo[] = $object->compare( '==', $prefix . '.dateend', null ); |
|
484 | + $exprTwo[] = $object->compare( '>=', $prefix.'.dateend', $curDate ); |
|
485 | + $exprTwo[] = $object->compare( '==', $prefix.'.dateend', null ); |
|
486 | 486 | $expr[] = $object->combine( '||', $exprTwo ); |
487 | 487 | |
488 | 488 | $object->setConditions( $object->combine( '&&', $expr ) ); |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | */ |
504 | 504 | public function getSubManager( $manager, $name = null ) |
505 | 505 | { |
506 | - return $this->getSubManagerBase( 'common', 'lists/' . $manager, $name ); |
|
506 | + return $this->getSubManagerBase( 'common', 'lists/'.$manager, $name ); |
|
507 | 507 | } |
508 | 508 | |
509 | 509 |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | $taxrates[$taxrate]->addItem( $price ); |
292 | 292 | } |
293 | - catch( \Exception $e ) { ; } // if delivery service isn't available |
|
293 | + catch( \Exception $e ) {; } // if delivery service isn't available |
|
294 | 294 | |
295 | 295 | try |
296 | 296 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | $taxrates[$taxrate]->addItem( $price ); |
305 | 305 | } |
306 | - catch( \Exception $e ) { ; } // if payment service isn't available |
|
306 | + catch( \Exception $e ) {; } // if payment service isn't available |
|
307 | 307 | |
308 | 308 | return $taxrates; |
309 | 309 | } |
@@ -233,8 +233,7 @@ discard block |
||
233 | 233 | { |
234 | 234 | $value = $price->getValue() + $price->getCosts(); |
235 | 235 | $rebate -= $value; |
236 | - } |
|
237 | - else |
|
236 | + } else |
|
238 | 237 | { |
239 | 238 | $value = $rebate; |
240 | 239 | $rebate = '0.00'; |
@@ -290,7 +289,9 @@ discard block |
||
290 | 289 | |
291 | 290 | $taxrates[$taxrate]->addItem( $price ); |
292 | 291 | } |
293 | - catch( \Exception $e ) { ; } // if delivery service isn't available |
|
292 | + catch( \Exception $e ) |
|
293 | + { |
|
294 | +; } // if delivery service isn't available |
|
294 | 295 | |
295 | 296 | try |
296 | 297 | { |
@@ -303,7 +304,9 @@ discard block |
||
303 | 304 | |
304 | 305 | $taxrates[$taxrate]->addItem( $price ); |
305 | 306 | } |
306 | - catch( \Exception $e ) { ; } // if payment service isn't available |
|
307 | + catch( \Exception $e ) |
|
308 | + { |
|
309 | +; } // if payment service isn't available |
|
307 | 310 | |
308 | 311 | return $taxrates; |
309 | 312 | } |
@@ -50,8 +50,7 @@ |
||
50 | 50 | if( isset( $config['fixedrebate.rebate'][$currency] ) ) { |
51 | 51 | $rebate = $config['fixedrebate.rebate'][$currency]; |
52 | 52 | } |
53 | - } |
|
54 | - else |
|
53 | + } else |
|
55 | 54 | { |
56 | 55 | $rebate = $config['fixedrebate.rebate']; |
57 | 56 | } |
@@ -209,7 +209,7 @@ |
||
209 | 209 | { |
210 | 210 | $path = 'mshop/plugin/manager/submanagers'; |
211 | 211 | |
212 | - return $this->getResourceTypeBase( 'plugin', $path, array( 'type'), $withsub ); |
|
212 | + return $this->getResourceTypeBase( 'plugin', $path, array( 'type' ), $withsub ); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 |
@@ -444,8 +444,7 @@ |
||
444 | 444 | * @see mshop/plugin/manager/standard/count/ansi |
445 | 445 | */ |
446 | 446 | $path = 'mshop/plugin/manager/standard/insert'; |
447 | - } |
|
448 | - else |
|
447 | + } else |
|
449 | 448 | { |
450 | 449 | /** mshop/plugin/manager/standard/update/mysql |
451 | 450 | * Updates an existing plugin record in the database |
@@ -118,10 +118,11 @@ |
||
118 | 118 | ) { |
119 | 119 | return false; |
120 | 120 | } |
121 | - } |
|
122 | - else if( isset( $addresses[$paymentType] ) ) // use billing address if no delivery address is available |
|
121 | + } else if( isset( $addresses[$paymentType] ) ) { |
|
122 | + // use billing address if no delivery address is available |
|
123 | 123 | { |
124 | 124 | $code = strtoupper( $addresses[$paymentType]->getCountryId() ); |
125 | + } |
|
125 | 126 | |
126 | 127 | if( $this->checkCountryCode( $code, 'country.delivery-include' ) === false |
127 | 128 | || $this->checkCountryCode( $code, 'country.delivery-exclude' ) === true |