@@ -100,8 +100,7 @@ discard block |
||
| 100 | 100 | || ( ( $user = \Illuminate\Support\Facades\Auth::user() ) !== null && $user->superuser ) |
| 101 | 101 | ) { |
| 102 | 102 | $helper = new \Aimeos\MW\View\Helper\Access\All( $view ); |
| 103 | - } |
|
| 104 | - else |
|
| 103 | + } else |
|
| 105 | 104 | { |
| 106 | 105 | $support = $this->support; |
| 107 | 106 | |
@@ -245,8 +244,7 @@ discard block |
||
| 245 | 244 | { |
| 246 | 245 | $i18n = $this->i18n->get( array( $locale ) ); |
| 247 | 246 | $translation = $i18n[$locale]; |
| 248 | - } |
|
| 249 | - else |
|
| 247 | + } else |
|
| 250 | 248 | { |
| 251 | 249 | $translation = new \Aimeos\MW\Translation\None( 'en' ); |
| 252 | 250 | } |
@@ -86,9 +86,12 @@ |
||
| 86 | 86 | { |
| 87 | 87 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); |
| 88 | 88 | |
| 89 | - try { |
|
| 89 | + try |
|
| 90 | + { |
|
| 90 | 91 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); |
| 91 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
| 92 | + } |
|
| 93 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 94 | + { |
|
| 92 | 95 | $localeItem = $localeManager->createItem(); |
| 93 | 96 | } |
| 94 | 97 | |
@@ -19,7 +19,8 @@ |
||
| 19 | 19 | * Aimeos shop service provider for Laravel |
| 20 | 20 | * @package laravel |
| 21 | 21 | */ |
| 22 | -class ShopServiceProvider extends ServiceProvider { |
|
| 22 | +class ShopServiceProvider extends ServiceProvider |
|
| 23 | +{ |
|
| 23 | 24 | |
| 24 | 25 | /** |
| 25 | 26 | * Indicates if loading of the provider is deferred. |
@@ -260,8 +260,7 @@ |
||
| 260 | 260 | { |
| 261 | 261 | if( ( $userid = Auth::id() ) !== null ) |
| 262 | 262 | { |
| 263 | - $context->setGroupIds( function() use ( $context, $userid ) |
|
| 264 | - { |
|
| 263 | + $context->setGroupIds( function() use ( $context, $userid ) { |
|
| 265 | 264 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
| 266 | 265 | return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups(); |
| 267 | 266 | } ); |
@@ -69,9 +69,12 @@ |
||
| 69 | 69 | $this->cache[$user->id][$groups] = false; |
| 70 | 70 | $context = $this->context->get( false ); |
| 71 | 71 | |
| 72 | - try { |
|
| 72 | + try |
|
| 73 | + { |
|
| 73 | 74 | $site = \Aimeos\MShop::create( $context, 'locale/site' )->getItem( $user->siteid )->getCode(); |
| 74 | - } catch( \Exception $e ) { |
|
| 75 | + } |
|
| 76 | + catch( \Exception $e ) |
|
| 77 | + { |
|
| 75 | 78 | $site = ( Route::current() ? Route::input( 'site', Request::get( 'site', 'default' ) ) : 'default' ); |
| 76 | 79 | } |
| 77 | 80 | |
@@ -68,9 +68,12 @@ |
||
| 68 | 68 | |
| 69 | 69 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
| 70 | 70 | |
| 71 | - try { |
|
| 71 | + try |
|
| 72 | + { |
|
| 72 | 73 | $item = $manager->findItem( $email ); |
| 73 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
| 74 | + } |
|
| 75 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 76 | + { |
|
| 74 | 77 | $item = $manager->createItem(); |
| 75 | 78 | } |
| 76 | 79 | |