Passed
Push — master ( d672e3...08f879 )
by Aimeos
04:07
created
src/Aimeos/Shop/Base/Shop.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	 * @param \Aimeos\Shop\Base\Context $context Context object
42 42
 	 * @param \Aimeos\Shop\Base\View $view View object
43 43
 	 */
44
-	public function __construct(  \Aimeos\Shop\Base\Aimeos $aimeos,
44
+	public function __construct( \Aimeos\Shop\Base\Aimeos $aimeos,
45 45
 		\Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\View $view )
46 46
 	{
47 47
 		$this->context = $context->get();
Please login to merge, or discard this patch.
src/Aimeos/Shop/Base/Locale.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,9 +68,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/AccountCommand.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,9 +162,12 @@
 block discarded – undo
162 162
 	{
163 163
 		$manager = \Aimeos\MShop::create( $context, 'customer' );
164 164
 
165
-		try {
165
+		try
166
+		{
166 167
 			$item = $manager->findItem( $email );
167
-		} catch( \Aimeos\MShop\Exception $e ) {
168
+		}
169
+		catch( \Aimeos\MShop\Exception $e )
170
+		{
168 171
 			$item = $manager->createItem();
169 172
 		}
170 173
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/ShopServiceProvider.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 		$this->loadRoutesFrom( $basedir . 'routes.php' );
43 43
 		$this->loadViewsFrom( $basedir . 'views', 'shop' );
44 44
 
45
-		$this->publishes( [ $basedir . 'config/shop.php' => config_path( 'shop.php' ) ], 'config' );
46
-		$this->publishes( [ dirname( $basedir ) . $ds . 'public' => public_path( 'packages/aimeos/shop' ) ], 'public' );
45
+		$this->publishes( [$basedir . 'config/shop.php' => config_path( 'shop.php' )], 'config' );
46
+		$this->publishes( [dirname( $basedir ) . $ds . 'public' => public_path( 'packages/aimeos/shop' )], 'public' );
47 47
 	}
48 48
 
49 49
 
@@ -54,38 +54,38 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function register()
56 56
 	{
57
-		$this->mergeConfigFrom( dirname( dirname( __DIR__ ) ) . DIRECTORY_SEPARATOR . 'default.php', 'shop');
57
+		$this->mergeConfigFrom( dirname( dirname( __DIR__ ) ) . DIRECTORY_SEPARATOR . 'default.php', 'shop' );
58 58
 
59
-		$this->app->singleton('aimeos', function($app) {
60
-			return new \Aimeos\Shop\Base\Aimeos($app['config']);
59
+		$this->app->singleton( 'aimeos', function( $app ) {
60
+			return new \Aimeos\Shop\Base\Aimeos( $app['config'] );
61 61
 		});
62 62
 
63
-		$this->app->singleton('aimeos.config', function($app) {
64
-			return new \Aimeos\Shop\Base\Config($app['config'], $app['aimeos']);
63
+		$this->app->singleton( 'aimeos.config', function( $app ) {
64
+			return new \Aimeos\Shop\Base\Config( $app['config'], $app['aimeos'] );
65 65
 		});
66 66
 
67
-		$this->app->singleton('aimeos.i18n', function($app) {
68
-			return new \Aimeos\Shop\Base\I18n($this->app['config'], $app['aimeos']);
67
+		$this->app->singleton( 'aimeos.i18n', function( $app ) {
68
+			return new \Aimeos\Shop\Base\I18n( $this->app['config'], $app['aimeos'] );
69 69
 		});
70 70
 
71
-		$this->app->singleton('aimeos.locale', function($app) {
72
-			return new \Aimeos\Shop\Base\Locale($app['config']);
71
+		$this->app->singleton( 'aimeos.locale', function( $app ) {
72
+			return new \Aimeos\Shop\Base\Locale( $app['config'] );
73 73
 		});
74 74
 
75
-		$this->app->singleton('aimeos.context', function($app) {
76
-			return new \Aimeos\Shop\Base\Context($app['session.store'], $app['aimeos.config'], $app['aimeos.locale'], $app['aimeos.i18n']);
75
+		$this->app->singleton( 'aimeos.context', function( $app ) {
76
+			return new \Aimeos\Shop\Base\Context( $app['session.store'], $app['aimeos.config'], $app['aimeos.locale'], $app['aimeos.i18n'] );
77 77
 		});
78 78
 
79
-		$this->app->singleton('aimeos.support', function($app) {
80
-			return new \Aimeos\Shop\Base\Support($app['aimeos.context'], $app['aimeos.locale']);
79
+		$this->app->singleton( 'aimeos.support', function( $app ) {
80
+			return new \Aimeos\Shop\Base\Support( $app['aimeos.context'], $app['aimeos.locale'] );
81 81
 		});
82 82
 
83
-		$this->app->singleton('aimeos.view', function($app) {
84
-			return new \Aimeos\Shop\Base\View($app['config'], $app['aimeos.i18n'], $app['aimeos.support']);
83
+		$this->app->singleton( 'aimeos.view', function( $app ) {
84
+			return new \Aimeos\Shop\Base\View( $app['config'], $app['aimeos.i18n'], $app['aimeos.support'] );
85 85
 		});
86 86
 
87
-		$this->app->singleton('aimeos.shop', function($app) {
88
-			return new \Aimeos\Shop\Base\Shop($app['aimeos'], $app['aimeos.context'], $app['aimeos.view']);
87
+		$this->app->singleton( 'aimeos.shop', function( $app ) {
88
+			return new \Aimeos\Shop\Base\Shop( $app['aimeos'], $app['aimeos.context'], $app['aimeos.view'] );
89 89
 		});
90 90
 
91 91
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
src/views/catalog/detail.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 @section('aimeos_scripts')
4 4
 	@parent
5
-    <script type="text/javascript" src="<?php echo asset('packages/aimeos/shop/themes/aimeos-detail.js'); ?>"></script>
5
+    <script type="text/javascript" src="<?php echo asset( 'packages/aimeos/shop/themes/aimeos-detail.js' ); ?>"></script>
6 6
 @stop
7 7
 
8 8
 @section('aimeos_header')
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/BasketController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
 			$params['aibody'][$name] = Shop::get( $name )->getBody();
37 37
 		}
38 38
 
39
-		return Response::view('shop::basket.index', $params)->header('Cache-Control', 'no-store');
39
+		return Response::view( 'shop::basket.index', $params )->header( 'Cache-Control', 'no-store' );
40 40
 	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/AccountController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 			$params['aibody'][$name] = Shop::get( $name )->getBody();
37 37
 		}
38 38
 
39
-		return Response::view('shop::account.index', $params);
39
+		return Response::view( 'shop::account.index', $params );
40 40
 	}
41 41
 
42 42
 
Please login to merge, or discard this patch.
tests/Controller/CheckoutControllerTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@
 block discarded – undo
4 4
 {
5 5
 	public function testConfirmAction()
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\CheckoutController@confirmAction', ['site' => 'unittest']);
9
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@confirmAction', ['site' => 'unittest'] );
10 10
 
11 11
 		$this->assertResponseOk();
12
-		$this->assertContains('<section class="aimeos checkout-confirm"', $response->getContent());
12
+		$this->assertContains( '<section class="aimeos checkout-confirm"', $response->getContent() );
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testIndexAction()
17 17
 	{
18
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
18
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
19 19
 
20
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest']);
20
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest'] );
21 21
 
22 22
 		$this->assertResponseOk();
23
-		$this->assertContains('<section class="checkout-standard-address"', $response->getContent());
23
+		$this->assertContains( '<section class="checkout-standard-address"', $response->getContent() );
24 24
 	}
25 25
 
26 26
 
27 27
 	public function testUpdateAction()
28 28
 	{
29
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
29
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
30 30
 
31
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress']);
31
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress'] );
32 32
 
33 33
 		$this->assertResponseOk();
34
-		$this->assertEquals('', $response->getContent());
34
+		$this->assertEquals( '', $response->getContent() );
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Controller/JsonapiControllerTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	public function testOptionsAction()
6 6
 	{
7
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
7
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
8 8
 
9 9
 		$params = ['site' => 'unittest'];
10
-		$response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonapiController@optionsAction', $params);
10
+		$response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonapiController@optionsAction', $params );
11 11
 
12 12
 		$json = json_decode( $response->getContent(), true );
13 13
 
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
 
21 21
 	public function testGetAction()
22 22
 	{
23
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
23
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
24 24
 
25 25
 		$params = ['site' => 'unittest', 'resource' => 'product'];
26 26
 		$getParams = ['filter' => ['f_search' => 'Cafe Noire Cap']];
27
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams);
27
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams );
28 28
 
29 29
 		$json = json_decode( $response->getContent(), true );
30 30
 
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 		$id = $json['data'][0]['id'];
39 39
 
40 40
 
41
-		$params = ['site' => 'unittest', 'resource' => 'product', 'id' => $id ];
42
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params);
41
+		$params = ['site' => 'unittest', 'resource' => 'product', 'id' => $id];
42
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params );
43 43
 
44 44
 		$json = json_decode( $response->getContent(), true );
45 45
 
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 
54 54
 	public function testPostPatchDeleteAction()
55 55
 	{
56
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
56
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
57 57
 
58 58
 		// get CNC product
59 59
 		$params = ['site' => 'unittest', 'resource' => 'product'];
60 60
 		$getParams = ['filter' => ['f_search' => 'Cafe Noire Cap', 'f_listtype' => 'unittype19']];
61
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams);
61
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams );
62 62
 
63 63
 		$json = json_decode( $response->getContent(), true );
64 64
 		$this->assertEquals( 'CNC', $json['data'][0]['attributes']['product.code'] );
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		// add CNC product to basket
67 67
 		$params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product'];
68 68
 		$content = json_encode( ['data' => ['attributes' => ['product.id' => $json['data'][0]['id']]]] );
69
-		$response = $this->action('POST', '\Aimeos\Shop\Controller\JsonapiController@postAction', $params, [], [], [], [], $content);
69
+		$response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonapiController@postAction', $params, [], [], [], [], $content );
70 70
 
71 71
 		$json = json_decode( $response->getContent(), true );
72 72
 		$this->assertEquals( 'CNC', $json['included'][0]['attributes']['order.base.product.prodcode'] );
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 		// change product quantity in basket
75 75
 		$params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product', 'relatedid' => 0];
76 76
 		$content = json_encode( ['data' => ['attributes' => ['quantity' => 2]]] );
77
-		$response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonapiController@patchAction', $params, [], [], [], [], $content);
77
+		$response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonapiController@patchAction', $params, [], [], [], [], $content );
78 78
 
79 79
 		$json = json_decode( $response->getContent(), true );
80 80
 		$this->assertEquals( 2, $json['included'][0]['attributes']['order.base.product.quantity'] );
81 81
 
82 82
 		// delete product from basket
83 83
 		$params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product', 'relatedid' => 0];
84
-		$response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonapiController@deleteAction', $params);
84
+		$response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonapiController@deleteAction', $params );
85 85
 
86 86
 		$json = json_decode( $response->getContent(), true );
87 87
 		$this->assertEquals( 0, count( $json['included'] ) );
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 
91 91
 	public function testPutAction()
92 92
 	{
93
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
93
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
94 94
 
95 95
 		$params = ['site' => 'unittest', 'resource' => 'basket'];
96
-		$response = $this->action('PUT', '\Aimeos\Shop\Controller\JsonapiController@putAction', $params);
96
+		$response = $this->action( 'PUT', '\Aimeos\Shop\Controller\JsonapiController@putAction', $params );
97 97
 
98 98
 		$json = json_decode( $response->getContent(), true );
99 99
 		$this->assertArrayHasKey( 'errors', $json );
Please login to merge, or discard this patch.