@@ -279,7 +279,7 @@ |
||
| 279 | 279 | $manager = \Aimeos\MShop::create( $context, 'locale/language' ); |
| 280 | 280 | |
| 281 | 281 | $search = $manager->createSearch(); |
| 282 | - $search->setSortations( [$search->sort( '-', 'locale.language.status'), $search->sort( '+', 'locale.language.id')] ); |
|
| 282 | + $search->setSortations( [$search->sort( '-', 'locale.language.status' ), $search->sort( '+', 'locale.language.id' )] ); |
|
| 283 | 283 | $search = $this->initCriteria( $search, $params ); |
| 284 | 284 | |
| 285 | 285 | $view->items = $manager->searchItems( $search, [], $total ); |
@@ -421,9 +421,12 @@ |
||
| 421 | 421 | { |
| 422 | 422 | $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' ); |
| 423 | 423 | |
| 424 | - try { |
|
| 424 | + try |
|
| 425 | + { |
|
| 425 | 426 | return $manager->getTree( null, [], \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE )->getId(); |
| 426 | - } catch( \Exception $e ) { |
|
| 427 | + } |
|
| 428 | + catch( \Exception $e ) |
|
| 429 | + { |
|
| 427 | 430 | return null; |
| 428 | 431 | } |
| 429 | 432 | } |
@@ -284,8 +284,7 @@ |
||
| 284 | 284 | { |
| 285 | 285 | $addrItem = $addrItems[$entry['supplier.address.id']]; |
| 286 | 286 | unset( $addrItems[$entry['supplier.address.id']] ); |
| 287 | - } |
|
| 288 | - else |
|
| 287 | + } else |
|
| 289 | 288 | { |
| 290 | 289 | $addrItem = $manager->createItem(); |
| 291 | 290 | } |
@@ -541,8 +541,7 @@ discard block |
||
| 541 | 541 | { |
| 542 | 542 | $attrItem = $attrItems[$array['order.base.service.attribute.id']]; |
| 543 | 543 | unset( $attrItems[$array['order.base.service.attribute.id']] ); |
| 544 | - } |
|
| 545 | - else |
|
| 544 | + } else |
|
| 546 | 545 | { |
| 547 | 546 | $attrItem = $attrManager->createItem(); |
| 548 | 547 | } |
@@ -577,9 +576,13 @@ discard block |
||
| 577 | 576 | { |
| 578 | 577 | $manager = \Aimeos\MShop::create( $this->getContext(), 'customer' ); |
| 579 | 578 | |
| 580 | - try { |
|
| 579 | + try |
|
| 580 | + { |
|
| 581 | 581 | $data += $manager->getItem( $item->getCustomerId() )->toArray(); |
| 582 | - } catch( \Exception $e ) {}; |
|
| 582 | + } |
|
| 583 | + catch( \Exception $e ) |
|
| 584 | + { |
|
| 585 | +}; |
|
| 583 | 586 | } |
| 584 | 587 | |
| 585 | 588 | |
@@ -39,9 +39,12 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $siteItem = $siteManager->findItem( $view->param( 'site', 'default' ) ); |
| 41 | 41 | |
| 42 | - try { |
|
| 42 | + try |
|
| 43 | + { |
|
| 43 | 44 | $siteid = $customerManager->getItem( $context->getUserId() )->getSiteId() ?: $siteItem->getSiteId(); |
| 44 | - } catch( \Exception $e ) { |
|
| 45 | + } |
|
| 46 | + catch( \Exception $e ) |
|
| 47 | + { |
|
| 45 | 48 | $siteid = $siteItem->getSiteId(); |
| 46 | 49 | } |
| 47 | 50 | |
@@ -70,8 +73,7 @@ discard block |
||
| 70 | 73 | if( ( $rootItem = reset( $sitePath ) ) !== false ) { |
| 71 | 74 | $view->pageSiteTree = $siteManager->getTree( $rootItem->getId(), [], $level ); |
| 72 | 75 | } |
| 73 | - } |
|
| 74 | - else |
|
| 76 | + } else |
|
| 75 | 77 | { |
| 76 | 78 | $view->pageSiteList = [$view->pageSiteTree]; |
| 77 | 79 | } |
@@ -284,8 +284,7 @@ |
||
| 284 | 284 | { |
| 285 | 285 | $addrItem = $addrItems[$entry['customer.address.id']]; |
| 286 | 286 | unset( $addrItems[$entry['customer.address.id']] ); |
| 287 | - } |
|
| 288 | - else |
|
| 287 | + } else |
|
| 289 | 288 | { |
| 290 | 289 | $addrItem = $manager->createItem(); |
| 291 | 290 | } |
@@ -303,8 +303,7 @@ |
||
| 303 | 303 | { |
| 304 | 304 | $propItem = $propItems[$entry['customer.property.id']]; |
| 305 | 305 | unset( $propItems[$entry['customer.property.id']] ); |
| 306 | - } |
|
| 307 | - else |
|
| 306 | + } else |
|
| 308 | 307 | { |
| 309 | 308 | $propItem = $manager->createItem(); |
| 310 | 309 | } |
@@ -407,7 +407,7 @@ |
||
| 407 | 407 | $data['time'] = $fs->time( $data['attribute.code'] ); |
| 408 | 408 | $data['size'] = $fs->size( $data['attribute.code'] ); |
| 409 | 409 | } |
| 410 | - catch( \Exception $e ) { ; } // Show product even if file isn't available any more |
|
| 410 | + catch( \Exception $e ) {; } // Show product even if file isn't available any more |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | return $data; |
@@ -407,7 +407,9 @@ |
||
| 407 | 407 | $data['time'] = $fs->time( $data['attribute.code'] ); |
| 408 | 408 | $data['size'] = $fs->size( $data['attribute.code'] ); |
| 409 | 409 | } |
| 410 | - catch( \Exception $e ) { ; } // Show product even if file isn't available any more |
|
| 410 | + catch( \Exception $e ) |
|
| 411 | + { |
|
| 412 | +; } // Show product even if file isn't available any more |
|
| 411 | 413 | } |
| 412 | 414 | |
| 413 | 415 | return $data; |
@@ -334,8 +334,7 @@ |
||
| 334 | 334 | { |
| 335 | 335 | $stockItem = $stockItems[$id]; |
| 336 | 336 | unset( $stockItems[$id] ); |
| 337 | - } |
|
| 338 | - else |
|
| 337 | + } else |
|
| 339 | 338 | { |
| 340 | 339 | $stockItem = $manager->createItem()->setType( $type ); |
| 341 | 340 | } |