Passed
Push — master ( 859d6d...626e5a )
by Aimeos
03:35
created
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/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.
tests/Controller/PageControllerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 {
5 5
 	public function testPrivacyAction()
6 6
 	{
7
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
7
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
8 8
 
9
-		$this->action('GET', '\Aimeos\Shop\Controller\PageController@privacyAction', ['site' => 'unittest']);
9
+		$this->action( 'GET', '\Aimeos\Shop\Controller\PageController@privacyAction', ['site' => 'unittest'] );
10 10
 		$this->assertResponseOk();
11 11
 	}
12 12
 
13 13
 
14 14
 	public function testTermsAction()
15 15
 	{
16
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
16
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
17 17
 
18
-		$this->action('GET', '\Aimeos\Shop\Controller\PageController@termsAction', ['site' => 'unittest']);
18
+		$this->action( 'GET', '\Aimeos\Shop\Controller\PageController@termsAction', ['site' => 'unittest'] );
19 19
 		$this->assertResponseOk();
20 20
 	}
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Controller/JsonadmControllerTest.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	public function testOptionsActionSite()
6 6
 	{
7
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
7
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
8 8
 
9 9
 		$params = ['site' => 'invalid', 'resource' => 'product'];
10
-		$response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params);
10
+		$response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params );
11 11
 
12 12
 		$json = json_decode( $response->getContent(), true );
13 13
 
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 
19 19
 	public function testOptionsAction()
20 20
 	{
21
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
21
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
22 22
 
23 23
 		$params = ['site' => 'unittest', 'resource' => 'product'];
24
-		$response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params);
24
+		$response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params );
25 25
 
26 26
 		$json = json_decode( $response->getContent(), true );
27 27
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 		$params = ['site' => 'unittest'];
35
-		$response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params);
35
+		$response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params );
36 36
 
37 37
 		$json = json_decode( $response->getContent(), true );
38 38
 
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 
46 46
 	public function testActionsSingle()
47 47
 	{
48
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
48
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
49 49
 
50 50
 		$params = ['site' => 'unittest', 'resource' => 'stock/type'];
51 51
 		$content = '{"data":{"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}}';
52
-		$response = $this->action('POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content);
52
+		$response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content );
53 53
 
54 54
 		$json = json_decode( $response->getContent(), true );
55 55
 
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 		$id = $json['data']['attributes']['stock.type.id'];
64 64
 
65 65
 
66
-		$params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ];
66
+		$params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id];
67 67
 		$content = '{"data":{"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel2"}}}';
68
-		$response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content);
68
+		$response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content );
69 69
 
70 70
 		$json = json_decode( $response->getContent(), true );
71 71
 
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 		$this->assertEquals( 1, $json['meta']['total'] );
79 79
 
80 80
 
81
-		$params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ];
82
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params);
81
+		$params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id];
82
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params );
83 83
 
84 84
 		$json = json_decode( $response->getContent(), true );
85 85
 
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 		$this->assertEquals( 1, $json['meta']['total'] );
93 93
 
94 94
 
95
-		$params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ];
96
-		$response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params);
95
+		$params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id];
96
+		$response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params );
97 97
 
98 98
 		$json = json_decode( $response->getContent(), true );
99 99
 
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 
106 106
 	public function testActionsBulk()
107 107
 	{
108
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
108
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
109 109
 
110 110
 		$params = ['site' => 'unittest', 'resource' => 'stock/type'];
111 111
 		$content = '{"data":[
112 112
 			{"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}},
113 113
 			{"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel"}}
114 114
 		]}';
115
-		$response = $this->action('POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content);
115
+		$response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content );
116 116
 
117 117
 		$json = json_decode( $response->getContent(), true );
118 118
 
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
 		$ids = array( $json['data'][0]['attributes']['stock.type.id'], $json['data'][1]['attributes']['stock.type.id'] );
129 129
 
130 130
 
131
-		$params = ['site' => 'unittest', 'resource' => 'stock/type' ];
131
+		$params = ['site' => 'unittest', 'resource' => 'stock/type'];
132 132
 		$content = '{"data":[
133 133
 			{"type":"stock/type","id":' . $ids[0] . ',"attributes":{"stock.type.label":"laravel2"}},
134 134
 			{"type":"stock/type","id":' . $ids[1] . ',"attributes":{"stock.type.label":"laravel2"}}
135 135
 		]}';
136
-		$response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content);
136
+		$response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content );
137 137
 
138 138
 		$json = json_decode( $response->getContent(), true );
139 139
 
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 		$this->assertEquals( 2, $json['meta']['total'] );
150 150
 
151 151
 
152
-		$params = ['site' => 'unittest', 'resource' => 'stock/type' ];
152
+		$params = ['site' => 'unittest', 'resource' => 'stock/type'];
153 153
 		$getParams = ['filter' => ['&&' => [
154 154
 			['=~' => ['stock.type.code' => 'laravel']],
155 155
 			['==' => ['stock.type.label' => 'laravel2']]
156 156
 			]],
157 157
 			'sort' => 'stock.type.code', 'page' => ['offset' => 0, 'limit' => 3]
158 158
 		];
159
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params, $getParams);
159
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params, $getParams );
160 160
 
161 161
 		$json = json_decode( $response->getContent(), true );
162 162
 
@@ -172,12 +172,12 @@  discard block
 block discarded – undo
172 172
 		$this->assertEquals( 2, $json['meta']['total'] );
173 173
 
174 174
 
175
-		$params = ['site' => 'unittest', 'resource' => 'stock/type' ];
175
+		$params = ['site' => 'unittest', 'resource' => 'stock/type'];
176 176
 		$content = '{"data":[
177 177
 			{"type":"stock/type","id":' . $ids[0] . '},
178 178
 			{"type":"stock/type","id":' . $ids[1] . '}
179 179
 		]}';
180
-		$response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params, [], [], [], [], $content);
180
+		$response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params, [], [], [], [], $content );
181 181
 
182 182
 		$json = json_decode( $response->getContent(), true );
183 183
 
@@ -189,14 +189,14 @@  discard block
 block discarded – undo
189 189
 
190 190
 	public function testPutAction()
191 191
 	{
192
-		View::addLocation(dirname(__DIR__).'/fixtures/views');
192
+		View::addLocation( dirname( __DIR__ ) . '/fixtures/views' );
193 193
 
194 194
 		$params = ['site' => 'unittest', 'resource' => 'stock/type'];
195 195
 		$content = '{"data":[
196 196
 			{"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}},
197 197
 			{"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel"}}
198 198
 		]}';
199
-		$response = $this->action('PUT', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content);
199
+		$response = $this->action( 'PUT', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content );
200 200
 
201 201
 		$json = json_decode( $response->getContent(), true );
202 202
 
Please login to merge, or discard this patch.