| @@ -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 | } | 
| @@ -4,6 +4,6 @@ | ||
| 4 | 4 |  { | 
| 5 | 5 | public function testJobsCommand() | 
| 6 | 6 |  	{ | 
| 7 | -		$this->assertEquals(0, $this->artisan('aimeos:jobs', array('jobs' => 'customer/email/watch', 'site' => 'unittest'))); | |
| 7 | + $this->assertEquals( 0, $this->artisan( 'aimeos:jobs', array( 'jobs' => 'customer/email/watch', 'site' => 'unittest' ) ) ); | |
| 8 | 8 | } | 
| 9 | 9 | } | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 | |
| 61 | 61 | if( Route::current() ) | 
| 62 | 62 |  			{ | 
| 63 | - $site = Route::input( 'site', $site ); | |
| 63 | + $site = Route::input( 'site', $site ); | |
| 64 | 64 | $currency = Route::input( 'currency', $currency ); | 
| 65 | 65 | $lang = Route::input( 'locale', $lang ); | 
| 66 | 66 | } | 
| @@ -68,9 +68,12 @@ discard block | ||
| 68 | 68 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); | 
| 69 | 69 | $disableSites = $this->config->get( 'shop.disableSites', true ); | 
| 70 | 70 | |
| 71 | -			try { | |
| 71 | + try | |
| 72 | +			{ | |
| 72 | 73 | $this->locale = $localeManager->bootstrap( $site, $lang, $currency, $disableSites ); | 
| 73 | -			} catch( \Aimeos\MShop\Locale\Exception $e ) { | |
| 74 | + } | |
| 75 | + catch( \Aimeos\MShop\Locale\Exception $e ) | |
| 76 | +			{ | |
| 74 | 77 | $this->locale = $localeManager->bootstrap( 'default', $lang, $currency, $disableSites ); | 
| 75 | 78 | } | 
| 76 | 79 | } | 
| @@ -90,9 +93,12 @@ discard block | ||
| 90 | 93 |  	{ | 
| 91 | 94 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); | 
| 92 | 95 | |
| 93 | -		try { | |
| 96 | + try | |
| 97 | +		{ | |
| 94 | 98 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); | 
| 95 | -		} catch( \Aimeos\MShop\Exception $e ) { | |
| 99 | + } | |
| 100 | + catch( \Aimeos\MShop\Exception $e ) | |
| 101 | +		{ | |
| 96 | 102 | $localeItem = $localeManager->createItem(); | 
| 97 | 103 | } | 
| 98 | 104 | |
| @@ -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 | } ); | 
| @@ -4,12 +4,12 @@ | ||
| 4 | 4 |  { | 
| 5 | 5 | public function testActions() | 
| 6 | 6 |  	{ | 
| 7 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); | |
| 7 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); | |
| 8 | 8 | |
| 9 | -		$response = $this->action('GET', '\Aimeos\Shop\Controller\BasketController@indexAction', ['site' => 'unittest']); | |
| 9 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\BasketController@indexAction', ['site' => 'unittest'] ); | |
| 10 | 10 | |
| 11 | 11 | $this->assertResponseOk(); | 
| 12 | -		$this->assertContains('<section class="aimeos basket-standard"', $response->getContent()); | |
| 13 | -		$this->assertContains('<section class="aimeos basket-related"', $response->getContent()); | |
| 12 | + $this->assertContains( '<section class="aimeos basket-standard"', $response->getContent() ); | |
| 13 | + $this->assertContains( '<section class="aimeos basket-related"', $response->getContent() ); | |
| 14 | 14 | } | 
| 15 | 15 | } | 
| 16 | 16 | \ No newline at end of file | 
| @@ -16,13 +16,13 @@ | ||
| 16 | 16 | */ | 
| 17 | 17 | class Service extends \Illuminate\Support\Facades\Facade | 
| 18 | 18 |  { | 
| 19 | - /** | |
| 20 | - * Returns a new service frontend controller object | |
| 21 | - * | |
| 22 | - * @return \Aimeos\Controller\Frontend\Service\Iface | |
| 23 | - */ | |
| 24 | - protected static function getFacadeAccessor() | |
| 25 | -    { | |
| 26 | - return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'service' ); | |
| 27 | - } | |
| 19 | + /** | |
| 20 | + * Returns a new service frontend controller object | |
| 21 | + * | |
| 22 | + * @return \Aimeos\Controller\Frontend\Service\Iface | |
| 23 | + */ | |
| 24 | + protected static function getFacadeAccessor() | |
| 25 | +	{ | |
| 26 | + return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'service' ); | |
| 27 | + } | |
| 28 | 28 | } | 
| @@ -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 | |