@@ -271,7 +271,7 @@ |
||
271 | 271 | |
272 | 272 | Route::group( $conf, function() { |
273 | 273 | |
274 | - Route::match(['GET', 'POST'], '{path?}', [ |
|
274 | + Route::match( ['GET', 'POST'], '{path?}', [ |
|
275 | 275 | 'as' => 'aimeos_page', |
276 | 276 | 'uses' => '\Aimeos\Shop\Controller\PageController@indexAction' |
277 | 277 | ] )->where( ['locale' => '[a-z]{2}(\_[A-Z]{2})?', 'site' => '[A-Za-z0-9\.\-]+'] ); |
@@ -122,7 +122,7 @@ |
||
122 | 122 | */ |
123 | 123 | protected function addCache( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface |
124 | 124 | { |
125 | - $cache = (new \Aimeos\MAdmin\Cache\Manager\Standard( $context ))->getCache(); |
|
125 | + $cache = ( new \Aimeos\MAdmin\Cache\Manager\Standard( $context ) )->getCache(); |
|
126 | 126 | |
127 | 127 | return $context->setCache( $cache ); |
128 | 128 | } |
@@ -309,9 +309,12 @@ |
||
309 | 309 | if( $userid = Auth::guard( $guard )->id() ) |
310 | 310 | { |
311 | 311 | $context->setGroupIds( function() use ( $context, $userid ) { |
312 | - try { |
|
312 | + try |
|
313 | + { |
|
313 | 314 | return \Aimeos\MShop::create( $context, 'customer' )->get( $userid, ['customer/group'] )->getGroups(); |
314 | - } catch( \Exception $e ) { |
|
315 | + } |
|
316 | + catch( \Exception $e ) |
|
317 | + { |
|
315 | 318 | return []; |
316 | 319 | } |
317 | 320 | } ); |
@@ -100,8 +100,7 @@ discard block |
||
100 | 100 | || ( ( $user = \Illuminate\Support\Facades\Auth::user() ) !== null && $user->superuser ) |
101 | 101 | ) { |
102 | 102 | $helper = new \Aimeos\Base\View\Helper\Access\All( $view ); |
103 | - } |
|
104 | - else |
|
103 | + } else |
|
105 | 104 | { |
106 | 105 | $support = $this->support; |
107 | 106 | |
@@ -166,8 +165,7 @@ discard block |
||
166 | 165 | { |
167 | 166 | $pattern = $config->get( 'client/html/common/format/pattern' ); |
168 | 167 | $helper = new \Aimeos\Base\View\Helper\Number\Locale( $view, $locale, $pattern ); |
169 | - } |
|
170 | - else |
|
168 | + } else |
|
171 | 169 | { |
172 | 170 | $sep1000 = $config->get( 'client/html/common/format/separator1000', '' ); |
173 | 171 | $decsep = $config->get( 'client/html/common/format/separatorDecimal', '.' ); |
@@ -253,8 +251,7 @@ discard block |
||
253 | 251 | { |
254 | 252 | $i18n = $this->i18n->get( array( $locale ) ); |
255 | 253 | $translation = $i18n[$locale]; |
256 | - } |
|
257 | - else |
|
254 | + } else |
|
258 | 255 | { |
259 | 256 | $translation = new \Aimeos\Base\Translation\None( 'en' ); |
260 | 257 | } |
@@ -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->create(); |
93 | 96 | } |
94 | 97 |
@@ -260,7 +260,7 @@ |
||
260 | 260 | $siteManager = \Aimeos\MShop::create( $context, 'locale/site'); |
261 | 261 | $context->config()->apply( $siteManager->find( $site )->getConfig() ); |
262 | 262 | |
263 | - $paths = $aimeos->getTemplatePaths( 'admin/jqadm/templates', $context->locale()->getSiteItem()->getTheme() ); |
|
263 | + $paths = $aimeos->getTemplatePaths( 'admin/jqadm/templates', $context->locale()->getSiteItem()->getTheme() ); |
|
264 | 264 | $view = app( 'aimeos.view' )->create( $context, $paths, $lang ); |
265 | 265 | |
266 | 266 | $view->aimeosType = 'Laravel'; |
@@ -257,7 +257,7 @@ |
||
257 | 257 | $context->setI18n( app( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) ); |
258 | 258 | $context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site ) ); |
259 | 259 | |
260 | - $siteManager = \Aimeos\MShop::create( $context, 'locale/site'); |
|
260 | + $siteManager = \Aimeos\MShop::create( $context, 'locale/site' ); |
|
261 | 261 | $context->config()->apply( $siteManager->find( $site )->getConfig() ); |
262 | 262 | |
263 | 263 | $paths = $aimeos->getTemplatePaths( 'admin/jqadm/templates', $context->locale()->getSiteItem()->getTheme() ); |
@@ -44,13 +44,14 @@ |
||
44 | 44 | { |
45 | 45 | \Composer\Factory::createHttpDownloader( $event->getIO(), $config ) |
46 | 46 | ->get( 'https://api.github.com/graphql', $options ); |
47 | - } |
|
48 | - else |
|
47 | + } else |
|
49 | 48 | { |
50 | 49 | \Composer\Factory::createRemoteFilesystem( $event->getIO(), $config ) |
51 | 50 | ->getContents( 'github.com', 'https://api.github.com/graphql', false, $options ); |
52 | 51 | } |
53 | 52 | } |
54 | - catch( \Exception $e ) {} |
|
53 | + catch( \Exception $e ) |
|
54 | + { |
|
55 | +} |
|
55 | 56 | } |
56 | 57 | } |
@@ -16,7 +16,8 @@ |
||
16 | 16 | /** |
17 | 17 | * Aimeos shop service provider for Laravel |
18 | 18 | */ |
19 | -class ShopServiceProvider extends ServiceProvider { |
|
19 | +class ShopServiceProvider extends ServiceProvider |
|
20 | +{ |
|
20 | 21 | |
21 | 22 | /** |
22 | 23 | * Indicates if loading of the provider is deferred. |
@@ -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->find( $email ); |
73 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
74 | + } |
|
75 | + catch( \Aimeos\MShop\Exception $e ) |
|
76 | + { |
|
74 | 77 | $item = $manager->create(); |
75 | 78 | } |
76 | 79 |
@@ -48,8 +48,7 @@ |
||
48 | 48 | $jobs = $this->argument( 'jobs' ); |
49 | 49 | $jobs = !is_array( $jobs ) ? explode( ' ', (string) $jobs ) : $jobs; |
50 | 50 | |
51 | - $fcn = function( \Aimeos\MShop\ContextIface $lcontext, \Aimeos\Bootstrap $aimeos ) use ( $jobs ) |
|
52 | - { |
|
51 | + $fcn = function( \Aimeos\MShop\ContextIface $lcontext, \Aimeos\Bootstrap $aimeos ) use ( $jobs ) { |
|
53 | 52 | $jobfcn = function( $context, $aimeos, $jobname ) { |
54 | 53 | \Aimeos\Controller\Jobs::create( $context, $aimeos, $jobname )->run(); |
55 | 54 | }; |