@@ -35,17 +35,17 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function indexAction() |
| 37 | 37 | { |
| 38 | - if( config( 'shop.authorize', true ) ) { |
|
| 39 | - $this->authorize( 'admin' ); |
|
| 38 | + if (config('shop.authorize', true)) { |
|
| 39 | + $this->authorize('admin'); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $param = array( |
| 43 | 43 | 'resource' => 'product', |
| 44 | - 'site' => Route::input( 'site', 'default' ), |
|
| 45 | - 'lang' => Input::get( 'lang', config( 'app.locale', 'en' ) ), |
|
| 44 | + 'site' => Route::input('site', 'default'), |
|
| 45 | + 'lang' => Input::get('lang', config('app.locale', 'en')), |
|
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | - return redirect()->route( 'aimeos_shop_jqadm_search', $param ); |
|
| 48 | + return redirect()->route('aimeos_shop_jqadm_search', $param); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected function getVersion() |
| 58 | 58 | { |
| 59 | - if( ( $content = @file_get_contents( base_path( 'composer.lock' ) ) ) !== false |
|
| 60 | - && ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] ) |
|
| 59 | + if (($content = @file_get_contents(base_path('composer.lock'))) !== false |
|
| 60 | + && ($content = json_decode($content, true)) !== null && isset($content['packages']) |
|
| 61 | 61 | ) { |
| 62 | - foreach( (array) $content['packages'] as $item ) |
|
| 62 | + foreach ((array) $content['packages'] as $item) |
|
| 63 | 63 | { |
| 64 | - if( $item['name'] === 'aimeos/aimeos-laravel' ) { |
|
| 64 | + if ($item['name'] === 'aimeos/aimeos-laravel') { |
|
| 65 | 65 | return $item['version']; |
| 66 | 66 | } |
| 67 | 67 | } |
@@ -79,23 +79,23 @@ discard block |
||
| 79 | 79 | * @param string $lang ISO language code, e.g. "en" or "en_GB" |
| 80 | 80 | * @return \Aimeos\MShop\Context\Item\Iface Modified context object |
| 81 | 81 | */ |
| 82 | - protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $lang = null ) |
|
| 82 | + protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $lang = null) |
|
| 83 | 83 | { |
| 84 | - $localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' ); |
|
| 84 | + $localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale'); |
|
| 85 | 85 | |
| 86 | 86 | try |
| 87 | 87 | { |
| 88 | - $localeItem = $localeManager->bootstrap( $sitecode, '', '', false ); |
|
| 89 | - $localeItem->setLanguageId( null ); |
|
| 90 | - $localeItem->setCurrencyId( null ); |
|
| 88 | + $localeItem = $localeManager->bootstrap($sitecode, '', '', false); |
|
| 89 | + $localeItem->setLanguageId(null); |
|
| 90 | + $localeItem->setCurrencyId(null); |
|
| 91 | 91 | } |
| 92 | - catch( \Aimeos\MShop\Locale\Exception $e ) |
|
| 92 | + catch (\Aimeos\MShop\Locale\Exception $e) |
|
| 93 | 93 | { |
| 94 | 94 | $localeItem = $localeManager->createItem(); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - $context->setLocale( $localeItem ); |
|
| 98 | - $context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang ) ) ); |
|
| 97 | + $context->setLocale($localeItem); |
|
| 98 | + $context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang))); |
|
| 99 | 99 | |
| 100 | 100 | return $context; |
| 101 | 101 | } |