Completed
Push — master ( 97619d...8081ca )
by Aimeos
04:10
created
src/Aimeos/Shop/Base/Page.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 	 * @param \Aimeos\Shop\Base\Context $context Context object
48 48
 	 * @param \Aimeos\Shop\Base\View $view View object
49 49
 	 */
50
-	public function __construct( \Illuminate\Contracts\Config\Repository $config,
51
-		\Aimeos\Shop\Base\Aimeos $aimeos, \Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\View $view )
50
+	public function __construct(\Illuminate\Contracts\Config\Repository $config,
51
+		\Aimeos\Shop\Base\Aimeos $aimeos, \Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\View $view)
52 52
 	{
53 53
 		$this->config = $config;
54 54
 		$this->aimeos = $aimeos;
@@ -63,23 +63,23 @@  discard block
 block discarded – undo
63 63
 	 * @param string $pageName Name of the configured page
64 64
 	 * @return array Associative list with body and header output separated by client name
65 65
 	 */
66
-	public function getSections( $pageName )
66
+	public function getSections($pageName)
67 67
 	{
68 68
 		$context = $this->context->get();
69 69
 		$langid = $context->getLocale()->getLanguageId();
70
-		$tmplPaths = $this->aimeos->get()->getCustomPaths( 'client/html/templates' );
71
-		$view = $this->view->create( $context->getConfig(), $tmplPaths, $langid );
72
-		$context->setView( $view );
70
+		$tmplPaths = $this->aimeos->get()->getCustomPaths('client/html/templates');
71
+		$view = $this->view->create($context->getConfig(), $tmplPaths, $langid);
72
+		$context->setView($view);
73 73
 
74
-		$pagesConfig = $this->config->get( 'shop.page', array() );
75
-		$result = array( 'aibody' => array(), 'aiheader' => array() );
74
+		$pagesConfig = $this->config->get('shop.page', array());
75
+		$result = array('aibody' => array(), 'aiheader' => array());
76 76
 
77
-		if( isset( $pagesConfig[$pageName] ) )
77
+		if (isset($pagesConfig[$pageName]))
78 78
 		{
79
-			foreach( (array) $pagesConfig[$pageName] as $clientName )
79
+			foreach ((array) $pagesConfig[$pageName] as $clientName)
80 80
 			{
81
-				$client = \Aimeos\Client\Html\Factory::createClient( $context, $tmplPaths, $clientName );
82
-				$client->setView( clone $view );
81
+				$client = \Aimeos\Client\Html\Factory::createClient($context, $tmplPaths, $clientName);
82
+				$client->setView(clone $view);
83 83
 				$client->process();
84 84
 
85 85
 				$result['aibody'][$clientName] = $client->getBody();
Please login to merge, or discard this patch.
src/Aimeos/Shop/Base/Support.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @param \Aimeos\Shop\Base\Context $context Context object
31 31
 	 */
32
-	public function __construct( \Aimeos\Shop\Base\Context $context )
32
+	public function __construct(\Aimeos\Shop\Base\Context $context)
33 33
 	{
34 34
 		$this->context = $context;
35 35
 	}
@@ -42,21 +42,21 @@  discard block
 block discarded – undo
42 42
 	 * @param string $groupcode Unique user/customer group code
43 43
 	 * @return boolean True if user is part of the group, false if not
44 44
 	 */
45
-	public function checkGroup( $userid, $groupcode )
45
+	public function checkGroup($userid, $groupcode)
46 46
 	{
47 47
 		$context = $this->context->get();
48
-		$group = \Aimeos\MShop\Factory::createManager( $context, 'customer/group' )->findItem( $groupcode );
49
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/lists' );
48
+		$group = \Aimeos\MShop\Factory::createManager($context, 'customer/group')->findItem($groupcode);
49
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/lists');
50 50
 
51 51
 		$search = $manager->createSearch();
52 52
 		$expr = array(
53
-			$search->compare( '==', 'customer.lists.parentid', $userid ),
54
-			$search->compare( '==', 'customer.lists.refid', $group->getId() ),
55
-			$search->compare( '==', 'customer.lists.domain', 'customer/group' ),
53
+			$search->compare('==', 'customer.lists.parentid', $userid),
54
+			$search->compare('==', 'customer.lists.refid', $group->getId()),
55
+			$search->compare('==', 'customer.lists.domain', 'customer/group'),
56 56
 		);
57
-		$search->setConditions( $search->combine( '&&', $expr ) );
58
-		$search->setSlice( 0, 1 );
57
+		$search->setConditions($search->combine('&&', $expr));
58
+		$search->setSlice(0, 1);
59 59
 
60
-		return (bool) count( $manager->searchItems( $search ) );
60
+		return (bool) count($manager->searchItems($search));
61 61
 	}
62 62
 }
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/JsonadmController.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
 	 * @param integer|null $id Unique resource ID
38 38
 	 * @return \Illuminate\Http\Response Response object containing the generated output
39 39
 	 */
40
-	public function deleteAction( Request $request, $site = 'default', $resource, $id = null )
40
+	public function deleteAction(Request $request, $site = 'default', $resource, $id = null)
41 41
 	{
42
-		if( config( 'shop.authorize', true ) ) {
43
-			$this->authorize( 'admin' );
42
+		if (config('shop.authorize', true)) {
43
+			$this->authorize('admin');
44 44
 		}
45 45
 
46 46
 		$status = 500;
47 47
 		$header = $request->headers->all();
48 48
 
49
-		$cntl = $this->createController( $site, $resource );
50
-		$result = $cntl->delete( $request->getContent(), $header, $status );
49
+		$cntl = $this->createController($site, $resource);
50
+		$result = $cntl->delete($request->getContent(), $header, $status);
51 51
 
52
-		return $this->createResponse( $result, $status, $header );
52
+		return $this->createResponse($result, $status, $header);
53 53
 	}
54 54
 
55 55
 
@@ -62,19 +62,19 @@  discard block
 block discarded – undo
62 62
 	 * @param integer|null $id Unique resource ID
63 63
 	 * @return \Illuminate\Http\Response Response object containing the generated output
64 64
 	 */
65
-	public function getAction( Request $request, $site = 'default', $resource, $id = null )
65
+	public function getAction(Request $request, $site = 'default', $resource, $id = null)
66 66
 	{
67
-		if( config( 'shop.authorize', true ) ) {
68
-			$this->authorize( 'admin' );
67
+		if (config('shop.authorize', true)) {
68
+			$this->authorize('admin');
69 69
 		}
70 70
 
71 71
 		$status = 500;
72 72
 		$header = $request->headers->all();
73 73
 
74
-		$cntl = $this->createController( $site, $resource );
75
-		$result = $cntl->get( $request->getContent(), $header, $status );
74
+		$cntl = $this->createController($site, $resource);
75
+		$result = $cntl->get($request->getContent(), $header, $status);
76 76
 
77
-		return $this->createResponse( $result, $status, $header );
77
+		return $this->createResponse($result, $status, $header);
78 78
 	}
79 79
 
80 80
 
@@ -87,19 +87,19 @@  discard block
 block discarded – undo
87 87
 	 * @param integer|null $id Unique resource ID
88 88
 	 * @return \Illuminate\Http\Response Response object containing the generated output
89 89
 	 */
90
-	public function patchAction( Request $request, $site = 'default', $resource, $id = null )
90
+	public function patchAction(Request $request, $site = 'default', $resource, $id = null)
91 91
 	{
92
-		if( config( 'shop.authorize', true ) ) {
93
-			$this->authorize( 'admin' );
92
+		if (config('shop.authorize', true)) {
93
+			$this->authorize('admin');
94 94
 		}
95 95
 
96 96
 		$status = 500;
97 97
 		$header = $request->headers->all();
98 98
 
99
-		$cntl = $this->createController( $site, $resource );
100
-		$result = $cntl->patch( $request->getContent(), $header, $status );
99
+		$cntl = $this->createController($site, $resource);
100
+		$result = $cntl->patch($request->getContent(), $header, $status);
101 101
 
102
-		return $this->createResponse( $result, $status, $header );
102
+		return $this->createResponse($result, $status, $header);
103 103
 	}
104 104
 
105 105
 
@@ -112,19 +112,19 @@  discard block
 block discarded – undo
112 112
 	 * @param integer $id Unique ID of the resource
113 113
 	 * @return \Illuminate\Http\Response Response object containing the generated output
114 114
 	 */
115
-	public function postAction( Request $request, $site = 'default', $resource, $id = null )
115
+	public function postAction(Request $request, $site = 'default', $resource, $id = null)
116 116
 	{
117
-		if( config( 'shop.authorize', true ) ) {
118
-			$this->authorize( 'admin' );
117
+		if (config('shop.authorize', true)) {
118
+			$this->authorize('admin');
119 119
 		}
120 120
 
121 121
 		$status = 500;
122 122
 		$header = $request->headers->all();
123 123
 
124
-		$cntl = $this->createController( $site, $resource );
125
-		$result = $cntl->post( $request->getContent(), $header, $status );
124
+		$cntl = $this->createController($site, $resource);
125
+		$result = $cntl->post($request->getContent(), $header, $status);
126 126
 
127
-		return $this->createResponse( $result, $status, $header );
127
+		return $this->createResponse($result, $status, $header);
128 128
 	}
129 129
 
130 130
 
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
 	 * @param integer|null $id Unique resource ID
138 138
 	 * @return \Illuminate\Http\Response Response object containing the generated output
139 139
 	 */
140
-	public function putAction( Request $request, $site = 'default', $resource, $id = null )
140
+	public function putAction(Request $request, $site = 'default', $resource, $id = null)
141 141
 	{
142
-		if( config( 'shop.authorize', true ) ) {
143
-			$this->authorize( 'admin' );
142
+		if (config('shop.authorize', true)) {
143
+			$this->authorize('admin');
144 144
 		}
145 145
 
146 146
 		$status = 500;
147 147
 		$header = $request->headers->all();
148 148
 
149
-		$cntl = $this->createController( $site, $resource );
150
-		$result = $cntl->put( $request->getContent(), $header, $status );
149
+		$cntl = $this->createController($site, $resource);
150
+		$result = $cntl->put($request->getContent(), $header, $status);
151 151
 
152
-		return $this->createResponse( $result, $status, $header );
152
+		return $this->createResponse($result, $status, $header);
153 153
 	}
154 154
 
155 155
 
@@ -161,19 +161,19 @@  discard block
 block discarded – undo
161 161
 	 * @param string $sitecode Unique site code
162 162
 	 * @return \Illuminate\Http\Response Response object containing the generated output
163 163
 	 */
164
-	public function optionsAction( Request $request, $site = 'default', $resource = '' )
164
+	public function optionsAction(Request $request, $site = 'default', $resource = '')
165 165
 	{
166
-		if( config( 'shop.authorize', true ) ) {
167
-			$this->authorize( 'admin' );
166
+		if (config('shop.authorize', true)) {
167
+			$this->authorize('admin');
168 168
 		}
169 169
 
170 170
 		$status = 500;
171 171
 		$header = $request->headers->all();
172 172
 
173
-		$cntl = $this->createController( $site, $resource );
174
-		$result = $cntl->options( $request->getContent(), $header, $status );
173
+		$cntl = $this->createController($site, $resource);
174
+		$result = $cntl->options($request->getContent(), $header, $status);
175 175
 
176
-		return $this->createResponse( $result, $status, $header );
176
+		return $this->createResponse($result, $status, $header);
177 177
 	}
178 178
 
179 179
 
@@ -183,20 +183,20 @@  discard block
 block discarded – undo
183 183
 	 * @param string $sitecode Unique site code
184 184
 	 * @return \Aimeos\MShop\Context\Item\Iface Context item
185 185
 	 */
186
-	protected function createController( $sitecode, $resource )
186
+	protected function createController($sitecode, $resource)
187 187
 	{
188
-		$lang = Input::get( 'lang', config( 'app.locale', 'en' ) );
188
+		$lang = Input::get('lang', config('app.locale', 'en'));
189 189
 
190
-		$aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get();
191
-		$templatePaths = $aimeos->getCustomPaths( 'controller/jsonadm/templates' );
190
+		$aimeos = app('\Aimeos\Shop\Base\Aimeos')->get();
191
+		$templatePaths = $aimeos->getCustomPaths('controller/jsonadm/templates');
192 192
 
193
-		$context = app( '\Aimeos\Shop\Base\Context' )->get( false );
194
-		$context = $this->setLocale( $context, $sitecode, $lang );
193
+		$context = app('\Aimeos\Shop\Base\Context')->get(false);
194
+		$context = $this->setLocale($context, $sitecode, $lang);
195 195
 
196
-		$view = app( '\Aimeos\Shop\Base\View' )->create( $context->getConfig(), $templatePaths, $lang );
197
-		$context->setView( $view );
196
+		$view = app('\Aimeos\Shop\Base\View')->create($context->getConfig(), $templatePaths, $lang);
197
+		$context->setView($view);
198 198
 
199
-		return \Aimeos\Controller\JsonAdm\Factory::createController( $context, $templatePaths, $resource );
199
+		return \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, $resource);
200 200
 	}
201 201
 
202 202
 
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
 	 * @param array $header List of HTTP headers
209 209
 	 * @return \Illuminate\Http\Response HTTP response object
210 210
 	 */
211
-	protected function createResponse( $content, $status, array $header )
211
+	protected function createResponse($content, $status, array $header)
212 212
 	{
213
-		$response = Response::make( $content, $status );
213
+		$response = Response::make($content, $status);
214 214
 
215
-		foreach( $header as $key => $value ) {
216
-			$response->header( $key, $value );
215
+		foreach ($header as $key => $value) {
216
+			$response->header($key, $value);
217 217
 		}
218 218
 
219 219
 		return $response;
@@ -228,23 +228,23 @@  discard block
 block discarded – undo
228 228
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
229 229
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
230 230
 	 */
231
-	protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang )
231
+	protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang)
232 232
 	{
233
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
233
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
234 234
 
235 235
 		try
236 236
 		{
237
-			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
238
-			$localeItem->setLanguageId( null );
239
-			$localeItem->setCurrencyId( null );
237
+			$localeItem = $localeManager->bootstrap($sitecode, '', '', false);
238
+			$localeItem->setLanguageId(null);
239
+			$localeItem->setCurrencyId(null);
240 240
 		}
241
-		catch( \Aimeos\MShop\Locale\Exception $e )
241
+		catch (\Aimeos\MShop\Locale\Exception $e)
242 242
 		{
243 243
 			$localeItem = $localeManager->createItem();
244 244
 		}
245 245
 
246
-		$context->setLocale( $localeItem );
247
-		$context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang ) ) );
246
+		$context->setLocale($localeItem);
247
+		$context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang)));
248 248
 
249 249
 		return $context;
250 250
 	}
Please login to merge, or discard this patch.
src/Aimeos/Shop/Base/Context.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param \Illuminate\Contracts\Config\Repository $config Configuration object
50 50
 	 * @param \Illuminate\Session\Store $session Laravel session object
51 51
 	 */
52
-	public function __construct( \Illuminate\Contracts\Config\Repository $config, \Illuminate\Session\Store $session )
52
+	public function __construct(\Illuminate\Contracts\Config\Repository $config, \Illuminate\Session\Store $session)
53 53
 	{
54 54
 		$this->config = $config;
55 55
 		$this->session = $session;
@@ -62,48 +62,48 @@  discard block
 block discarded – undo
62 62
 	 * @param boolean $locale True to add locale object to context, false if not
63 63
 	 * @return \Aimeos\MShop\Context\Item\Iface Context object
64 64
 	 */
65
-	public function get( $locale = true )
65
+	public function get($locale = true)
66 66
 	{
67
-		if( self::$context === null )
67
+		if (self::$context === null)
68 68
 		{
69 69
 			$context = new \Aimeos\MShop\Context\Item\Standard();
70 70
 
71 71
 			$config = $this->getConfig();
72
-			$context->setConfig( $config );
72
+			$context->setConfig($config);
73 73
 
74
-			$dbm = new \Aimeos\MW\DB\Manager\PDO( $config );
75
-			$context->setDatabaseManager( $dbm );
74
+			$dbm = new \Aimeos\MW\DB\Manager\PDO($config);
75
+			$context->setDatabaseManager($dbm);
76 76
 
77
-			$fs = new \Aimeos\MW\Filesystem\Manager\Laravel( app( 'filesystem' ), $config, storage_path( 'aimeos' ) );
78
-			$context->setFilesystemManager( $fs );
77
+			$fs = new \Aimeos\MW\Filesystem\Manager\Laravel(app('filesystem'), $config, storage_path('aimeos'));
78
+			$context->setFilesystemManager($fs);
79 79
 
80
-			$mail = new \Aimeos\MW\Mail\Swift( function() { return app( 'mailer' )->getSwiftMailer(); } );
81
-			$context->setMail( $mail );
80
+			$mail = new \Aimeos\MW\Mail\Swift(function() { return app('mailer')->getSwiftMailer(); } );
81
+			$context->setMail($mail);
82 82
 
83
-			$logger = \Aimeos\MAdmin\Log\Manager\Factory::createManager( $context );
84
-			$context->setLogger( $logger );
83
+			$logger = \Aimeos\MAdmin\Log\Manager\Factory::createManager($context);
84
+			$context->setLogger($logger);
85 85
 
86
-			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $context );
87
-			$context->setCache( $cache );
86
+			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($context);
87
+			$context->setCache($cache);
88 88
 
89 89
 			self::$context = $context;
90 90
 		}
91 91
 
92 92
 		$context = self::$context;
93 93
 
94
-		if( $locale === true )
94
+		if ($locale === true)
95 95
 		{
96
-			$localeItem = $this->getLocale( $context );
96
+			$localeItem = $this->getLocale($context);
97 97
 			$langid = $localeItem->getLanguageId();
98 98
 
99
-			$context->setLocale( $localeItem );
100
-			$context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $langid ) ) );
99
+			$context->setLocale($localeItem);
100
+			$context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($langid)));
101 101
 		}
102 102
 
103
-		$session = new \Aimeos\MW\Session\Laravel5( $this->session );
104
-		$context->setSession( $session );
103
+		$session = new \Aimeos\MW\Session\Laravel5($this->session);
104
+		$context->setSession($session);
105 105
 
106
-		$this->addUser( $context );
106
+		$this->addUser($context);
107 107
 
108 108
 		return $context;
109 109
 	}
@@ -114,20 +114,20 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
116 116
 	 */
117
-	protected function addUser( \Aimeos\MShop\Context\Item\Iface $context )
117
+	protected function addUser(\Aimeos\MShop\Context\Item\Iface $context)
118 118
 	{
119
-		if( ( $userid = Auth::id() ) !== null )
119
+		if (($userid = Auth::id()) !== null)
120 120
 		{
121
-			$context->setUserId( $userid );
122
-			$context->setGroupIds( function() use ( $context, $userid )
121
+			$context->setUserId($userid);
122
+			$context->setGroupIds(function() use ($context, $userid)
123 123
 			{
124
-				$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' );
125
-				return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups();
124
+				$manager = \Aimeos\MShop\Factory::createManager($context, 'customer');
125
+				return $manager->getItem($userid, array('customer/group'))->getGroups();
126 126
 			} );
127 127
 		}
128 128
 
129
-		if( ( $user = Auth::user() ) !== null ) {
130
-			$context->setEditor( $user->name );
129
+		if (($user = Auth::user()) !== null) {
130
+			$context->setEditor($user->name);
131 131
 		}
132 132
 	}
133 133
 
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	protected function getConfig()
141 141
 	{
142
-		$conf = $this->config->get( 'shop' );
142
+		$conf = $this->config->get('shop');
143 143
 
144
-		$configPaths = app( '\Aimeos\Shop\Base\Aimeos' )->get()->getConfigPaths( 'mysql' );
145
-		$config = new \Aimeos\MW\Config\PHPArray( $conf, $configPaths );
144
+		$configPaths = app('\Aimeos\Shop\Base\Aimeos')->get()->getConfigPaths('mysql');
145
+		$config = new \Aimeos\MW\Config\PHPArray($conf, $configPaths);
146 146
 
147
-		if( function_exists( 'apc_store' ) === true && $this->config->get( 'shop.apc_enabled', false ) == true ) {
148
-			$config = new \Aimeos\MW\Config\Decorator\APC( $config, $this->config->get( 'shop.apc_prefix', 'laravel:' ) );
147
+		if (function_exists('apc_store') === true && $this->config->get('shop.apc_enabled', false) == true) {
148
+			$config = new \Aimeos\MW\Config\Decorator\APC($config, $this->config->get('shop.apc_prefix', 'laravel:'));
149 149
 		}
150 150
 
151 151
 		return $config;
@@ -158,15 +158,15 @@  discard block
 block discarded – undo
158 158
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
159 159
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
160 160
 	 */
161
-	protected function getLocale( \Aimeos\MShop\Context\Item\Iface $context )
161
+	protected function getLocale(\Aimeos\MShop\Context\Item\Iface $context)
162 162
 	{
163
-		if( $this->locale === null )
163
+		if ($this->locale === null)
164 164
 		{
165
-			if( Route::current() !== null )
165
+			if (Route::current() !== null)
166 166
 			{
167
-				$site = Route::input( 'site', 'default' );
168
-				$lang = Route::input( 'locale', '' );
169
-				$currency = Route::input( 'currency', '' );
167
+				$site = Route::input('site', 'default');
168
+				$lang = Route::input('locale', '');
169
+				$currency = Route::input('currency', '');
170 170
 			}
171 171
 			else
172 172
 			{
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
 				$lang = $currency = '';
175 175
 			}
176 176
 
177
-			$disableSites = $this->config->has( 'shop.disableSites' );
177
+			$disableSites = $this->config->has('shop.disableSites');
178 178
 
179
-			$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
180
-			$this->locale = $localeManager->bootstrap( $site, $lang, $currency, $disableSites );
179
+			$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
180
+			$this->locale = $localeManager->bootstrap($site, $lang, $currency, $disableSites);
181 181
 		}
182 182
 
183 183
 		return $this->locale;
Please login to merge, or discard this patch.
src/Aimeos/Shop/Base/View.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -31,48 +31,48 @@  discard block
 block discarded – undo
31 31
 	 * @param string|null $locale Code of the current language or null for no translation
32 32
 	 * @return \Aimeos\MW\View\Iface View object
33 33
 	 */
34
-	public function create( \Aimeos\MW\Config\Iface $config, array $templatePaths, $locale = null )
34
+	public function create(\Aimeos\MW\Config\Iface $config, array $templatePaths, $locale = null)
35 35
 	{
36 36
 		$params = $fixed = array();
37 37
 
38
-		if( $locale !== null )
38
+		if ($locale !== null)
39 39
 		{
40 40
 			$params = Route::current()->parameters() + Input::all();
41 41
 			$fixed = $this->getFixedParams();
42 42
 
43
-			$i18n = app('\Aimeos\Shop\Base\I18n')->get( array( $locale ) );
43
+			$i18n = app('\Aimeos\Shop\Base\I18n')->get(array($locale));
44 44
 			$translation = $i18n[$locale];
45 45
 		}
46 46
 		else
47 47
 		{
48
-			$translation = new \Aimeos\MW\Translation\None( 'en' );
48
+			$translation = new \Aimeos\MW\Translation\None('en');
49 49
 		}
50 50
 
51 51
 
52
-		$view = new \Aimeos\MW\View\Standard( $templatePaths );
52
+		$view = new \Aimeos\MW\View\Standard($templatePaths);
53 53
 
54
-		$helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $translation );
55
-		$view->addHelper( 'translate', $helper );
54
+		$helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $translation);
55
+		$view->addHelper('translate', $helper);
56 56
 
57
-		$helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app('url'), $fixed );
58
-		$view->addHelper( 'url', $helper );
57
+		$helper = new \Aimeos\MW\View\Helper\Url\Laravel5($view, app('url'), $fixed);
58
+		$view->addHelper('url', $helper);
59 59
 
60
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params );
61
-		$view->addHelper( 'param', $helper );
60
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $params);
61
+		$view->addHelper('param', $helper);
62 62
 
63
-		$helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config );
64
-		$view->addHelper( 'config', $helper );
63
+		$helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config);
64
+		$view->addHelper('config', $helper);
65 65
 
66
-		$sepDec = $config->get( 'client/html/common/format/seperatorDecimal', '.' );
67
-		$sep1000 = $config->get( 'client/html/common/format/seperator1000', ' ' );
68
-		$helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, $sepDec, $sep1000 );
69
-		$view->addHelper( 'number', $helper );
66
+		$sepDec = $config->get('client/html/common/format/seperatorDecimal', '.');
67
+		$sep1000 = $config->get('client/html/common/format/seperator1000', ' ');
68
+		$helper = new \Aimeos\MW\View\Helper\Number\Standard($view, $sepDec, $sep1000);
69
+		$view->addHelper('number', $helper);
70 70
 
71
-		$helper = new \Aimeos\MW\View\Helper\Request\Laravel5( $view, Request::instance() );
72
-		$view->addHelper( 'request', $helper );
71
+		$helper = new \Aimeos\MW\View\Helper\Request\Laravel5($view, Request::instance());
72
+		$view->addHelper('request', $helper);
73 73
 
74
-		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, '_token', csrf_token() );
75
-		$view->addHelper( 'csrf', $helper );
74
+		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_token', csrf_token());
75
+		$view->addHelper('csrf', $helper);
76 76
 
77 77
 		return $view;
78 78
 	}
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
 	{
88 88
 		$fixed = array();
89 89
 
90
-		if( ( $value = Route::input( 'site' ) ) !== null ) {
90
+		if (($value = Route::input('site')) !== null) {
91 91
 			$fixed['site'] = $value;
92 92
 		}
93 93
 
94
-		if( ( $value = Route::input( 'locale' ) ) !== null ) {
94
+		if (($value = Route::input('locale')) !== null) {
95 95
 			$fixed['locale'] = $value;
96 96
 		}
97 97
 
98
-		if( ( $value = Route::input( 'currency' ) ) !== null ) {
98
+		if (($value = Route::input('currency')) !== null) {
99 99
 			$fixed['currency'] = $value;
100 100
 		}
101 101
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/SetupCommand.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -36,31 +36,31 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	public function fire()
38 38
 	{
39
-		$ctx = $this->getLaravel()->make( '\Aimeos\Shop\Base\Context' )->get( false );
40
-		$ctx->setEditor( 'aimeos:setup' );
39
+		$ctx = $this->getLaravel()->make('\Aimeos\Shop\Base\Context')->get(false);
40
+		$ctx->setEditor('aimeos:setup');
41 41
 
42 42
 		$config = $ctx->getConfig();
43
-		$site = $this->argument( 'site' );
44
-		$template = $this->argument( 'tplsite' );
43
+		$site = $this->argument('site');
44
+		$template = $this->argument('tplsite');
45 45
 
46
-		$config->set( 'setup/site', $site );
47
-		$dbconfig = $this->getDbConfig( $config );
48
-		$this->setOptions( $config );
46
+		$config->set('setup/site', $site);
47
+		$dbconfig = $this->getDbConfig($config);
48
+		$this->setOptions($config);
49 49
 
50
-		$taskPaths = $this->getLaravel()->make( '\Aimeos\Shop\Base\Aimeos' )->get()->getSetupPaths( $template );
50
+		$taskPaths = $this->getLaravel()->make('\Aimeos\Shop\Base\Aimeos')->get()->getSetupPaths($template);
51 51
 
52 52
 		$includePaths = $taskPaths;
53 53
 		$includePaths[] = get_include_path();
54 54
 
55
-		if( set_include_path( implode( PATH_SEPARATOR, $includePaths ) ) === false ) {
56
-			throw new Exception( 'Unable to extend include path' );
55
+		if (set_include_path(implode(PATH_SEPARATOR, $includePaths)) === false) {
56
+			throw new Exception('Unable to extend include path');
57 57
 		}
58 58
 
59
-		$manager = new \Aimeos\MW\Setup\Manager\Multiple( $ctx->getDatabaseManager(), $dbconfig, $taskPaths, $ctx );
59
+		$manager = new \Aimeos\MW\Setup\Manager\Multiple($ctx->getDatabaseManager(), $dbconfig, $taskPaths, $ctx);
60 60
 
61
-		$this->info( sprintf( 'Initializing or updating the Aimeos database tables for site "%1$s"', $site ) );
61
+		$this->info(sprintf('Initializing or updating the Aimeos database tables for site "%1$s"', $site));
62 62
 
63
-		$manager->run( 'mysql' );
63
+		$manager->run('mysql');
64 64
 	}
65 65
 
66 66
 
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	protected function getArguments()
73 73
 	{
74 74
 		return array(
75
-			array( 'site', InputArgument::OPTIONAL, 'Site for updating database entries', 'default' ),
76
-			array( 'tplsite', InputArgument::OPTIONAL, 'Site used as template for creating the new one', 'default' ),
75
+			array('site', InputArgument::OPTIONAL, 'Site for updating database entries', 'default'),
76
+			array('tplsite', InputArgument::OPTIONAL, 'Site used as template for creating the new one', 'default'),
77 77
 		);
78 78
 	}
79 79
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	protected function getOptions()
87 87
 	{
88 88
 		return array(
89
-			array( 'option', null, InputOption::VALUE_REQUIRED, 'Optional setup configuration, name and value are separated by ":" like "setup/default/demo:1"', array() ),
89
+			array('option', null, InputOption::VALUE_REQUIRED, 'Optional setup configuration, name and value are separated by ":" like "setup/default/demo:1"', array()),
90 90
 		);
91 91
 	}
92 92
 
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 	 * @param \Aimeos\MW\Config\Iface $conf Config object
98 98
 	 * @return array Multi-dimensional associative list of database configuration parameters
99 99
 	 */
100
-	protected function getDbConfig( \Aimeos\MW\Config\Iface $conf )
100
+	protected function getDbConfig(\Aimeos\MW\Config\Iface $conf)
101 101
 	{
102
-		$dbconfig = $conf->get( 'resource', array() );
102
+		$dbconfig = $conf->get('resource', array());
103 103
 
104
-		foreach( $dbconfig as $rname => $dbconf )
104
+		foreach ($dbconfig as $rname => $dbconf)
105 105
 		{
106
-			if( strncmp( $rname, 'db', 2 ) !== 0 ) {
107
-				unset( $dbconfig[$rname] );
106
+			if (strncmp($rname, 'db', 2) !== 0) {
107
+				unset($dbconfig[$rname]);
108 108
 			}
109 109
 		}
110 110
 
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 	 * @param array Associative list of database configurations
120 120
 	 * @throws \RuntimeException If the format of the options is invalid
121 121
 	 */
122
-	protected function setOptions( \Aimeos\MW\Config\Iface $conf )
122
+	protected function setOptions(\Aimeos\MW\Config\Iface $conf)
123 123
 	{
124
-		foreach( (array) $this->option( 'option' ) as $option )
124
+		foreach ((array) $this->option('option') as $option)
125 125
 		{
126
-			list( $name, $value ) = explode( ':', $option );
127
-			$conf->set( $name, $value );
126
+			list($name, $value) = explode(':', $option);
127
+			$conf->set($name, $value);
128 128
 		}
129 129
 	}
130 130
 }
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/AccountCommand.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -39,21 +39,21 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	public function fire()
41 41
 	{
42
-		$code = $this->argument( 'email' );
43
-		if( ( $password = $this->option( 'password' ) ) === null ) {
44
-			$password = $this->secret( 'Password' );
42
+		$code = $this->argument('email');
43
+		if (($password = $this->option('password')) === null) {
44
+			$password = $this->secret('Password');
45 45
 		}
46 46
 
47
-		$context = $this->getLaravel()->make( 'Aimeos\Shop\Base\Context' )->get( false );
48
-		$context->setEditor( 'aimeos:account' );
47
+		$context = $this->getLaravel()->make('Aimeos\Shop\Base\Context')->get(false);
48
+		$context->setEditor('aimeos:account');
49 49
 
50
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
51
-		$context->setLocale( $localeManager->createItem() );
50
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
51
+		$context->setLocale($localeManager->createItem());
52 52
 
53
-		$user = $this->createCustomerItem( $context, $code, $password );
53
+		$user = $this->createCustomerItem($context, $code, $password);
54 54
 
55
-		if( $this->option( 'admin' ) ) {
56
-			$this->addPrivilege( $context, $user, 'admin' );
55
+		if ($this->option('admin')) {
56
+			$this->addPrivilege($context, $user, 'admin');
57 57
 		}
58 58
 	}
59 59
 
@@ -65,31 +65,31 @@  discard block
 block discarded – undo
65 65
 	 * @param string $userid Unique user ID
66 66
 	 * @param string $groupid Unique group ID
67 67
 	 */
68
-	protected function addListItem( \Aimeos\MShop\Context\Item\Iface $context, $userid, $groupid )
68
+	protected function addListItem(\Aimeos\MShop\Context\Item\Iface $context, $userid, $groupid)
69 69
 	{
70
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context )->getSubmanager( 'lists' );
71
-		$typeid = $manager->getSubmanager( 'type' )->findItem( 'default', array(), 'customer/group' )->getId();
70
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context)->getSubmanager('lists');
71
+		$typeid = $manager->getSubmanager('type')->findItem('default', array(), 'customer/group')->getId();
72 72
 
73 73
 		$search = $manager->createSearch();
74 74
 		$expr = array(
75
-			$search->compare( '==', 'customer.lists.parentid', $userid ),
76
-			$search->compare( '==', 'customer.lists.refid', $groupid ),
77
-			$search->compare( '==', 'customer.lists.domain', 'customer/group' ),
78
-			$search->compare( '==', 'customer.lists.typeid', $typeid ),
75
+			$search->compare('==', 'customer.lists.parentid', $userid),
76
+			$search->compare('==', 'customer.lists.refid', $groupid),
77
+			$search->compare('==', 'customer.lists.domain', 'customer/group'),
78
+			$search->compare('==', 'customer.lists.typeid', $typeid),
79 79
 		);
80
-		$search->setConditions( $search->combine( '&&', $expr ) );
81
-		$search->setSlice( 0, 1 );
80
+		$search->setConditions($search->combine('&&', $expr));
81
+		$search->setSlice(0, 1);
82 82
 
83
-		if( count( $manager->searchItems( $search ) ) === 0 )
83
+		if (count($manager->searchItems($search)) === 0)
84 84
 		{
85 85
 			$item = $manager->createItem();
86
-			$item->setDomain( 'customer/group' );
87
-			$item->setParentId( $userid );
88
-			$item->setTypeId( $typeid );
89
-			$item->setRefId( $groupid );
90
-			$item->setStatus( 1 );
86
+			$item->setDomain('customer/group');
87
+			$item->setParentId($userid);
88
+			$item->setTypeId($typeid);
89
+			$item->setRefId($groupid);
90
+			$item->setStatus(1);
91 91
 
92
-			$manager->saveItem( $item, false );
92
+			$manager->saveItem($item, false);
93 93
 		}
94 94
 	}
95 95
 
@@ -101,23 +101,23 @@  discard block
 block discarded – undo
101 101
 	 * @param \Aimeos\MShop\Customer\Item\Iface $user Aimeos customer object
102 102
 	 * @param string $privilege Unique customer group code
103 103
 	 */
104
-	protected function addPrivilege( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Customer\Item\Iface $user, $privilege )
104
+	protected function addPrivilege(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Customer\Item\Iface $user, $privilege)
105 105
 	{
106
-		$this->info( sprintf( 'Add "%1$s" privilege to user "%2$s" for sites', $privilege, $user->getCode() ) );
106
+		$this->info(sprintf('Add "%1$s" privilege to user "%2$s" for sites', $privilege, $user->getCode()));
107 107
 
108
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
108
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
109 109
 
110
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
110
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
111 111
 		{
112
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
112
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
113 113
 
114 114
 			$lcontext = clone $context;
115
-			$lcontext->setLocale( $localeItem );
115
+			$lcontext->setLocale($localeItem);
116 116
 
117
-			$this->info( '- ' . $siteItem->getCode() );
117
+			$this->info('- ' . $siteItem->getCode());
118 118
 
119
-			$groupItem = $this->getGroupItem( $lcontext, $privilege );
120
-			$this->addListItem( $lcontext, $user->getId(), $groupItem->getId() );
119
+			$groupItem = $this->getGroupItem($lcontext, $privilege);
120
+			$this->addListItem($lcontext, $user->getId(), $groupItem->getId());
121 121
 		}
122 122
 	}
123 123
 
@@ -132,21 +132,21 @@  discard block
 block discarded – undo
132 132
 	 * @param string $password New user password
133 133
 	 * @return \Aimeos\MShop\Customer\Item\Iface Aimeos customer item object
134 134
 	 */
135
-	protected function createCustomerItem( \Aimeos\MShop\Context\Item\Iface $context, $email, $password )
135
+	protected function createCustomerItem(\Aimeos\MShop\Context\Item\Iface $context, $email, $password)
136 136
 	{
137
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' );
137
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'customer');
138 138
 
139 139
 		try {
140
-			$item = $manager->findItem( $email );
141
-		} catch( \Aimeos\MShop\Exception $e ) {
140
+			$item = $manager->findItem($email);
141
+		} catch (\Aimeos\MShop\Exception $e) {
142 142
 			$item = $manager->createItem();
143 143
 		}
144 144
 
145
-		$item->setCode( $email );
146
-		$item->getPaymentAddress()->setEmail( $email );
147
-		$item->setPassword( $password );
145
+		$item->setCode($email);
146
+		$item->getPaymentAddress()->setEmail($email);
147
+		$item->setPassword($password);
148 148
 
149
-		$manager->saveItem( $item );
149
+		$manager->saveItem($item);
150 150
 
151 151
 		return $item;
152 152
 	}
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
 	protected function getArguments()
161 161
 	{
162 162
 		return array(
163
-			array( 'email', InputArgument::REQUIRED, 'E-mail address of the account that should be created' ),
164
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to create accounts for like "default unittest" (none for all)' ),
163
+			array('email', InputArgument::REQUIRED, 'E-mail address of the account that should be created'),
164
+			array('site', InputArgument::OPTIONAL, 'Site codes to create accounts for like "default unittest" (none for all)'),
165 165
 		);
166 166
 	}
167 167
 
@@ -173,21 +173,21 @@  discard block
 block discarded – undo
173 173
 	 * @param string $code Unique customer group code
174 174
 	 * @return \Aimeos\MShop\Customer\Item\Group\Iface Aimeos customer group item object
175 175
 	 */
176
-	protected function getGroupItem( \Aimeos\MShop\Context\Item\Iface $context, $code )
176
+	protected function getGroupItem(\Aimeos\MShop\Context\Item\Iface $context, $code)
177 177
 	{
178
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context )->getSubmanager( 'group' );
178
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context)->getSubmanager('group');
179 179
 
180 180
 		try
181 181
 		{
182
-			$item = $manager->findItem( $code );
182
+			$item = $manager->findItem($code);
183 183
 		}
184
-		catch( \Aimeos\MShop\Exception $e )
184
+		catch (\Aimeos\MShop\Exception $e)
185 185
 		{
186 186
 			$item = $manager->createItem();
187
-			$item->setLabel( $code );
188
-			$item->setCode( $code );
187
+			$item->setLabel($code);
188
+			$item->setCode($code);
189 189
 
190
-			$manager->saveItem( $item );
190
+			$manager->saveItem($item);
191 191
 		}
192 192
 
193 193
 		return $item;
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 	protected function getOptions()
203 203
 	{
204 204
 		return array(
205
-				array( 'password', null, InputOption::VALUE_REQUIRED, 'Optional password for the account (will ask for if not given)' ),
206
-				array( 'admin', null, InputOption::VALUE_NONE, 'If account should have administrator privileges' ),
205
+				array('password', null, InputOption::VALUE_REQUIRED, 'Optional password for the account (will ask for if not given)'),
206
+				array('admin', null, InputOption::VALUE_NONE, 'If account should have administrator privileges'),
207 207
 		);
208 208
 	}
209 209
 }
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::match( array( 'GET' ), 'admin', array(
3
+Route::match(array('GET'), 'admin', array(
4 4
 	'as' => 'aimeos_shop_admin',
5 5
 	'uses' => 'Aimeos\Shop\Controller\AdminController@indexAction'
6 6
 ));
@@ -8,97 +8,97 @@  discard block
 block discarded – undo
8 8
 
9 9
 Route::group(config('shop.routes.admin', ['middleware' => 'auth']), function() {
10 10
 
11
-	Route::match( array( 'GET' ), 'extadm', array(
11
+	Route::match(array('GET'), 'extadm', array(
12 12
 		'as' => 'aimeos_shop_extadm',
13 13
 		'uses' => 'Aimeos\Shop\Controller\ExtadmController@indexAction'
14 14
 	));
15 15
 
16
-	Route::match( array( 'GET' ), 'extadm/file', array(
16
+	Route::match(array('GET'), 'extadm/file', array(
17 17
 		'as' => 'aimeos_shop_extadm_file',
18 18
 		'uses' => 'Aimeos\Shop\Controller\ExtadmController@fileAction'
19 19
 	));
20 20
 
21
-	Route::match( array( 'POST' ), 'extadm/do', array(
21
+	Route::match(array('POST'), 'extadm/do', array(
22 22
 		'as' => 'aimeos_shop_extadm_json',
23 23
 		'uses' => 'Aimeos\Shop\Controller\ExtadmController@doAction'
24 24
 	));
25 25
 
26 26
 
27
-	Route::match( array( 'GET', 'POST' ), 'jqadm/copy/{resource}/{id}', array(
27
+	Route::match(array('GET', 'POST'), 'jqadm/copy/{resource}/{id}', array(
28 28
 		'as' => 'aimeos_shop_jqadm_copy',
29 29
 		'uses' => 'Aimeos\Shop\Controller\JqadmController@copyAction'
30
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]+' ) );
30
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]+'));
31 31
 
32
-	Route::match( array( 'GET', 'POST' ), 'jqadm/create/{resource}', array(
32
+	Route::match(array('GET', 'POST'), 'jqadm/create/{resource}', array(
33 33
 		'as' => 'aimeos_shop_jqadm_create',
34 34
 		'uses' => 'Aimeos\Shop\Controller\JqadmController@createAction'
35
-	))->where( array( 'resource' => '[^0-9]+' ) );
35
+	))->where(array('resource' => '[^0-9]+'));
36 36
 
37
-	Route::match( array( 'GET', 'POST' ), 'jqadm/delete/{resource}/{id}', array(
37
+	Route::match(array('GET', 'POST'), 'jqadm/delete/{resource}/{id}', array(
38 38
 		'as' => 'aimeos_shop_jqadm_delete',
39 39
 		'uses' => 'Aimeos\Shop\Controller\JqadmController@deleteAction'
40
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]+' ) );
40
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]+'));
41 41
 
42
-	Route::match( array( 'GET' ), 'jqadm/get/{resource}/{id}', array(
42
+	Route::match(array('GET'), 'jqadm/get/{resource}/{id}', array(
43 43
 		'as' => 'aimeos_shop_jqadm_get',
44 44
 		'uses' => 'Aimeos\Shop\Controller\JqadmController@getAction'
45
-	))->where( array( 'resource' => '[^0-9]*', 'id' => '[0-9]+' ) );
45
+	))->where(array('resource' => '[^0-9]*', 'id' => '[0-9]+'));
46 46
 
47
-	Route::match( array( 'POST' ), 'jqadm/save/{resource}/{id?}', array(
47
+	Route::match(array('POST'), 'jqadm/save/{resource}/{id?}', array(
48 48
 		'as' => 'aimeos_shop_jqadm_save',
49 49
 		'uses' => 'Aimeos\Shop\Controller\JqadmController@saveAction'
50
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) );
50
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*'));
51 51
 
52
-	Route::match( array( 'GET', 'POST' ), 'jqadm/search/{resource}', array(
52
+	Route::match(array('GET', 'POST'), 'jqadm/search/{resource}', array(
53 53
 		'as' => 'aimeos_shop_jqadm_search',
54 54
 		'uses' => 'Aimeos\Shop\Controller\JqadmController@searchAction'
55
-	))->where( array( 'resource' => '[^0-9]+' ) );
55
+	))->where(array('resource' => '[^0-9]+'));
56 56
 
57 57
 
58
-	Route::match( array( 'DELETE' ), 'jsonadm/{resource}/{id?}', array(
58
+	Route::match(array('DELETE'), 'jsonadm/{resource}/{id?}', array(
59 59
 		'as' => 'aimeos_shop_jsonadm_delete',
60 60
 		'uses' => 'Aimeos\Shop\Controller\JsonadmController@deleteAction'
61
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) );
61
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*'));
62 62
 
63
-	Route::match( array( 'GET' ), 'jsonadm/{resource}/{id?}', array(
63
+	Route::match(array('GET'), 'jsonadm/{resource}/{id?}', array(
64 64
 		'as' => 'aimeos_shop_jsonadm_get',
65 65
 		'uses' => 'Aimeos\Shop\Controller\JsonadmController@getAction'
66
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) );
66
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*'));
67 67
 
68
-	Route::match( array( 'PATCH' ), 'jsonadm/{resource}/{id?}', array(
68
+	Route::match(array('PATCH'), 'jsonadm/{resource}/{id?}', array(
69 69
 		'as' => 'aimeos_shop_jsonadm_patch',
70 70
 		'uses' => 'Aimeos\Shop\Controller\JsonadmController@patchAction'
71
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) );
71
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*'));
72 72
 
73
-	Route::match( array( 'POST' ), 'jsonadm/{resource}/{id?}', array(
73
+	Route::match(array('POST'), 'jsonadm/{resource}/{id?}', array(
74 74
 		'as' => 'aimeos_shop_jsonadm_post',
75 75
 		'uses' => 'Aimeos\Shop\Controller\JsonadmController@postAction'
76
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) );
76
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*'));
77 77
 
78
-	Route::match( array( 'PUT' ), 'jsonadm/{resource}/{id?}', array(
78
+	Route::match(array('PUT'), 'jsonadm/{resource}/{id?}', array(
79 79
 		'as' => 'aimeos_shop_jsonadm_put',
80 80
 		'uses' => 'Aimeos\Shop\Controller\JsonadmController@putAction'
81
-	))->where( array( 'resource' => '[^0-9]+', 'id' => '[0-9]*' ) );
81
+	))->where(array('resource' => '[^0-9]+', 'id' => '[0-9]*'));
82 82
 
83
-	Route::match( array( 'OPTIONS' ), 'jsonadm/{resource?}', array(
83
+	Route::match(array('OPTIONS'), 'jsonadm/{resource?}', array(
84 84
 		'as' => 'aimeos_shop_jsonadm_options',
85 85
 		'uses' => 'Aimeos\Shop\Controller\JsonadmController@optionsAction'
86
-	))->where( array( 'resource' => '[^0-9]*' ) );
86
+	))->where(array('resource' => '[^0-9]*'));
87 87
 
88 88
 });
89 89
 
90 90
 
91 91
 Route::group(config('shop.routes.account', ['middleware' => 'auth']), function() {
92 92
 
93
-	Route::match( array( 'GET', 'POST' ), 'myaccount', array(
93
+	Route::match(array('GET', 'POST'), 'myaccount', array(
94 94
 		'as' => 'aimeos_shop_account',
95 95
 		'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction'
96 96
 	));
97
-	Route::match( array( 'GET', 'POST' ), 'myaccount/favorite/{fav_action?}/{fav_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array(
97
+	Route::match(array('GET', 'POST'), 'myaccount/favorite/{fav_action?}/{fav_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array(
98 98
 		'as' => 'aimeos_shop_account_favorite',
99 99
 		'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction'
100 100
 	));
101
-	Route::match( array( 'GET', 'POST' ), 'myaccount/watch/{wat_action?}/{wat_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array(
101
+	Route::match(array('GET', 'POST'), 'myaccount/watch/{wat_action?}/{wat_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array(
102 102
 		'as' => 'aimeos_shop_account_watch',
103 103
 		'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction'
104 104
 	));
@@ -108,45 +108,45 @@  discard block
 block discarded – undo
108 108
 
109 109
 Route::group(config('shop.routes.default', []), function() {
110 110
 
111
-	Route::match( array( 'GET', 'POST' ), 'basket', array(
111
+	Route::match(array('GET', 'POST'), 'basket', array(
112 112
 		'as' => 'aimeos_shop_basket',
113 113
 		'uses' => 'Aimeos\Shop\Controller\BasketController@indexAction'
114 114
 	));
115 115
 
116
-	Route::match( array( 'GET', 'POST' ), 'count', array(
116
+	Route::match(array('GET', 'POST'), 'count', array(
117 117
 		'as' => 'aimeos_shop_count',
118 118
 		'uses' => 'Aimeos\Shop\Controller\CatalogController@countAction'
119 119
 	));
120
-	Route::match( array( 'GET', 'POST' ), 'detail/{d_prodid}/{d_name?}/{l_pos?}', array(
120
+	Route::match(array('GET', 'POST'), 'detail/{d_prodid}/{d_name?}/{l_pos?}', array(
121 121
 		'as' => 'aimeos_shop_detail',
122 122
 		'uses' => 'Aimeos\Shop\Controller\CatalogController@detailAction'
123 123
 	));
124
-	Route::match( array( 'GET', 'POST' ), 'detail/pin/{pin_action?}/{pin_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array(
124
+	Route::match(array('GET', 'POST'), 'detail/pin/{pin_action?}/{pin_id?}/{d_prodid?}/{d_name?}/{l_pos?}', array(
125 125
 		'as' => 'aimeos_shop_session_pinned',
126 126
 		'uses' => 'Aimeos\Shop\Controller\CatalogController@detailAction'
127 127
 	));
128
-	Route::match( array( 'GET', 'POST' ), 'list', array(
128
+	Route::match(array('GET', 'POST'), 'list', array(
129 129
 		'as' => 'aimeos_shop_list',
130 130
 		'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction'
131 131
 	));
132
-	Route::match( array( 'GET', 'POST' ), 'suggest', array(
132
+	Route::match(array('GET', 'POST'), 'suggest', array(
133 133
 		'as' => 'aimeos_shop_suggest',
134 134
 		'uses' => 'Aimeos\Shop\Controller\CatalogController@suggestAction'
135 135
 	));
136
-	Route::match( array( 'GET', 'POST' ), 'stock', array(
136
+	Route::match(array('GET', 'POST'), 'stock', array(
137 137
 		'as' => 'aimeos_shop_stock',
138 138
 		'uses' => 'Aimeos\Shop\Controller\CatalogController@stockAction'
139 139
 	));
140 140
 
141
-	Route::match( array( 'GET', 'POST' ), 'checkout/{c_step?}', array(
141
+	Route::match(array('GET', 'POST'), 'checkout/{c_step?}', array(
142 142
 		'as' => 'aimeos_shop_checkout',
143 143
 		'uses' => 'Aimeos\Shop\Controller\CheckoutController@indexAction'
144 144
 	));
145
-	Route::match( array( 'GET', 'POST' ), 'confirm', array(
145
+	Route::match(array('GET', 'POST'), 'confirm', array(
146 146
 		'as' => 'aimeos_shop_confirm',
147 147
 		'uses' => 'Aimeos\Shop\Controller\CheckoutController@confirmAction'
148 148
 	));
149
-	Route::match( array( 'GET', 'POST' ), 'update', array(
149
+	Route::match(array('GET', 'POST'), 'update', array(
150 150
 		'as' => 'aimeos_shop_update',
151 151
 		'uses' => 'Aimeos\Shop\Controller\CheckoutController@updateAction'
152 152
 	));
Please login to merge, or discard this patch.
src/views/extadm/index.blade.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
         }
42 42
         </script>
43 43
 
44
-		<script type="text/javascript" src="<?= route( 'aimeos_shop_extadm_file', array( 'site' => 'default' ) ); ?>"></script>
44
+		<script type="text/javascript" src="<?= route('aimeos_shop_extadm_file', array('site' => 'default')); ?>"></script>
45 45
 
46 46
     </head>
47 47
     <body>
Please login to merge, or discard this patch.