Completed
Push — master ( 94b1b2...b701ad )
by Aimeos
02:37
created
src/Controller/Extadm.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
 	 * Creates a list of all available translations
161 161
 	 *
162 162
 	 * @param \Aimeos\Bootstrap $aimeos Aimeos object
163
-	 * @return array List of language IDs with labels
163
+	 * @return string List of language IDs with labels
164 164
 	 */
165 165
 	protected static function getJsonLanguages( \Aimeos\Bootstrap $aimeos )
166 166
 	{
Please login to merge, or discard this patch.
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -32,62 +32,62 @@  discard block
 block discarded – undo
32 32
 	 * @param array $args Associative list of route parameters
33 33
 	 * @return ResponseInterface $response Modified response object with generated output
34 34
 	 */
35
-	public static function indexAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
35
+	public static function indexAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
36 36
 	{
37
-		$site = ( isset( $args['site'] ) ? $args['site'] : 'default' );
38
-		$lang = ( isset( $args['lang'] ) ? $args['lang'] : 'en' );
39
-		$tab = ( isset( $args['tab'] ) ? $args['tab'] : 0 );
37
+		$site = (isset($args['site']) ? $args['site'] : 'default');
38
+		$lang = (isset($args['lang']) ? $args['lang'] : 'en');
39
+		$tab = (isset($args['tab']) ? $args['tab'] : 0);
40 40
 
41
-		$aimeos = $container->get( 'aimeos' );
42
-		$cntlPaths = $aimeos->getCustomPaths( 'controller/extjs' );
41
+		$aimeos = $container->get('aimeos');
42
+		$cntlPaths = $aimeos->getCustomPaths('controller/extjs');
43 43
 
44
-		$context = $container->get( 'aimeos_context' )->get( false, $args );
45
-		$context = self::setLocale( $context, $site, $lang );
44
+		$context = $container->get('aimeos_context')->get(false, $args);
45
+		$context = self::setLocale($context, $site, $lang);
46 46
 
47
-		$controller = new \Aimeos\Controller\ExtJS\JsonRpc( $context, $cntlPaths );
47
+		$controller = new \Aimeos\Controller\ExtJS\JsonRpc($context, $cntlPaths);
48 48
 		$cssFiles = array();
49 49
 
50
-		foreach( $aimeos->getCustomPaths( 'admin/extjs' ) as $base => $paths )
50
+		foreach ($aimeos->getCustomPaths('admin/extjs') as $base => $paths)
51 51
 		{
52
-			foreach( $paths as $path )
52
+			foreach ($paths as $path)
53 53
 			{
54 54
 				$jsbAbsPath = $base . '/' . $path;
55 55
 
56
-				if( !is_file( $jsbAbsPath ) ) {
57
-					throw new \Exception( sprintf( 'JSB2 file "%1$s" not found', $jsbAbsPath ) );
56
+				if (!is_file($jsbAbsPath)) {
57
+					throw new \Exception(sprintf('JSB2 file "%1$s" not found', $jsbAbsPath));
58 58
 				}
59 59
 
60
-				$jsb2 = new \Aimeos\MW\Jsb2\Standard( $jsbAbsPath, dirname( $path ) );
61
-				$cssFiles = array_merge( $cssFiles, $jsb2->getUrls( 'css' ) );
60
+				$jsb2 = new \Aimeos\MW\Jsb2\Standard($jsbAbsPath, dirname($path));
61
+				$cssFiles = array_merge($cssFiles, $jsb2->getUrls('css'));
62 62
 			}
63 63
 		}
64 64
 
65
-		$csrfname = $request->getAttribute( 'csrf_name' );
66
-		$csrfvalue = $request->getAttribute( 'csrf_value' );
65
+		$csrfname = $request->getAttribute('csrf_name');
66
+		$csrfvalue = $request->getAttribute('csrf_value');
67 67
 
68
-		$router = $container->get( 'router' );
69
-		$jqadmUrl = $router->pathFor( 'aimeos_shop_jqadm_search', array( 'site' => $site, 'resource' => 'product' ) );
70
-		$jsonUrl = $router->pathFor( 'aimeos_shop_extadm_json', array( 'site' => $site, $csrfname => $csrfvalue ) );
71
-		$adminUrl = $router->pathFor( 'aimeos_shop_extadm', array( 'site' => '<site>', 'lang' => '<lang>', 'tab' => '<tab>' ) );
68
+		$router = $container->get('router');
69
+		$jqadmUrl = $router->pathFor('aimeos_shop_jqadm_search', array('site' => $site, 'resource' => 'product'));
70
+		$jsonUrl = $router->pathFor('aimeos_shop_extadm_json', array('site' => $site, $csrfname => $csrfvalue));
71
+		$adminUrl = $router->pathFor('aimeos_shop_extadm', array('site' => '<site>', 'lang' => '<lang>', 'tab' => '<tab>'));
72 72
 
73 73
 		$vars = array(
74 74
 			'lang' => $lang,
75 75
 			'cssFiles' => $cssFiles,
76
-			'languages' => self::getJsonLanguages( $aimeos ),
77
-			'config' => self::getJsonClientConfig( $context ),
78
-			'site' => self::getJsonSiteItem( $context, $site ),
79
-			'i18nContent' => self::getJsonClientI18n( $aimeos->getI18nPaths(), $lang ),
80
-			'uploaddir' => $context->getConfig()->get( 'uploaddir', '/' ),
76
+			'languages' => self::getJsonLanguages($aimeos),
77
+			'config' => self::getJsonClientConfig($context),
78
+			'site' => self::getJsonSiteItem($context, $site),
79
+			'i18nContent' => self::getJsonClientI18n($aimeos->getI18nPaths(), $lang),
80
+			'uploaddir' => $context->getConfig()->get('uploaddir', '/'),
81 81
 			'searchSchemas' => $controller->getJsonSearchSchemas(),
82 82
 			'itemSchemas' => $controller->getJsonItemSchemas(),
83
-			'smd' => $controller->getJsonSmd( $jsonUrl ),
83
+			'smd' => $controller->getJsonSmd($jsonUrl),
84 84
 			'urlTemplate' => $adminUrl,
85 85
 			'jqadmurl' => $jqadmUrl,
86 86
 			'activeTab' => $tab,
87 87
 			'version' => \Aimeos\Slim\Bootstrap::getVersion(),
88 88
 		);
89 89
 
90
-		return $container->get( 'view' )->render( $response, 'Extadm/index.html.twig', $vars );
90
+		return $container->get('view')->render($response, 'Extadm/index.html.twig', $vars);
91 91
 	}
92 92
 
93 93
 
@@ -100,21 +100,21 @@  discard block
 block discarded – undo
100 100
 	 * @param array $args Associative list of route parameters
101 101
 	 * @return ResponseInterface $response Modified response object with generated output
102 102
 	 */
103
-	public static function doAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
103
+	public static function doAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
104 104
 	{
105
-		$cntlPaths = $container->get( 'aimeos' )->getCustomPaths( 'controller/extjs' );
105
+		$cntlPaths = $container->get('aimeos')->getCustomPaths('controller/extjs');
106 106
 
107
-		$context = $container->get( 'aimeos_context' )->get( false, $args );
108
-		$context = self::setLocale( $context );
107
+		$context = $container->get('aimeos_context')->get(false, $args);
108
+		$context = self::setLocale($context);
109 109
 
110 110
 		$params = $request->getQueryParams();
111
-		if( ( $post = $request->getParsedBody() ) !== null ) {
112
-			$params = array_merge( $params, (array) $post );
111
+		if (($post = $request->getParsedBody()) !== null) {
112
+			$params = array_merge($params, (array) $post);
113 113
 		}
114 114
 
115
-		$controller = new \Aimeos\Controller\ExtJS\JsonRpc( $context, $cntlPaths );
116
-		$output = $controller->process( $params, (string) $request->getBody() );
117
-		$response->getBody()->write( $output );
115
+		$controller = new \Aimeos\Controller\ExtJS\JsonRpc($context, $cntlPaths);
116
+		$output = $controller->process($params, (string) $request->getBody());
117
+		$response->getBody()->write($output);
118 118
 
119 119
 		return $response;
120 120
 	}
@@ -129,30 +129,30 @@  discard block
 block discarded – undo
129 129
 	 * @param array $args Associative list of route parameters
130 130
 	 * @return ResponseInterface $response Modified response object with generated output
131 131
 	 */
132
-	public static function fileAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
132
+	public static function fileAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
133 133
 	{
134 134
 		$contents = '';
135 135
 		$jsFiles = array();
136
-		$aimeos = $container->get( 'aimeos' );
136
+		$aimeos = $container->get('aimeos');
137 137
 
138
-		foreach( $aimeos->getCustomPaths( 'admin/extjs' ) as $base => $paths )
138
+		foreach ($aimeos->getCustomPaths('admin/extjs') as $base => $paths)
139 139
 		{
140
-			foreach( $paths as $path )
140
+			foreach ($paths as $path)
141 141
 			{
142 142
 				$jsbAbsPath = $base . '/' . $path;
143
-				$jsb2 = new \Aimeos\MW\Jsb2\Standard( $jsbAbsPath, dirname( $jsbAbsPath ) );
144
-				$jsFiles = array_merge( $jsFiles, $jsb2->getFiles( 'js' ) );
143
+				$jsb2 = new \Aimeos\MW\Jsb2\Standard($jsbAbsPath, dirname($jsbAbsPath));
144
+				$jsFiles = array_merge($jsFiles, $jsb2->getFiles('js'));
145 145
 			}
146 146
 		}
147 147
 
148
-		foreach( $jsFiles as $file )
148
+		foreach ($jsFiles as $file)
149 149
 		{
150
-			if( ( $content = file_get_contents( $file ) ) !== false ) {
150
+			if (($content = file_get_contents($file)) !== false) {
151 151
 				$contents .= $content;
152 152
 			}
153 153
 		}
154 154
 
155
-		return $response->withHeader( 'Content-Type', 'application/javascript' )->getBody()->write( $contents );
155
+		return $response->withHeader('Content-Type', 'application/javascript')->getBody()->write($contents);
156 156
 	}
157 157
 
158 158
 
@@ -162,15 +162,15 @@  discard block
 block discarded – undo
162 162
 	 * @param \Aimeos\Bootstrap $aimeos Aimeos object
163 163
 	 * @return array List of language IDs with labels
164 164
 	 */
165
-	protected static function getJsonLanguages( \Aimeos\Bootstrap $aimeos )
165
+	protected static function getJsonLanguages(\Aimeos\Bootstrap $aimeos)
166 166
 	{
167 167
 		$result = array();
168 168
 
169
-		foreach( $aimeos->getI18nList( 'admin' ) as $id ) {
170
-			$result[] = array( 'id' => $id, 'label' => $id );
169
+		foreach ($aimeos->getI18nList('admin') as $id) {
170
+			$result[] = array('id' => $id, 'label' => $id);
171 171
 		}
172 172
 
173
-		return json_encode( $result );
173
+		return json_encode($result);
174 174
 	}
175 175
 
176 176
 
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context item object
181 181
 	 * @return string JSON encoded configuration object
182 182
 	 */
183
-	protected static function getJsonClientConfig( \Aimeos\MShop\Context\Item\Iface $context )
183
+	protected static function getJsonClientConfig(\Aimeos\MShop\Context\Item\Iface $context)
184 184
 	{
185
-		$config = $context->getConfig()->get( 'admin/extjs', array() );
186
-		return json_encode( array( 'admin' => array( 'extjs' => $config ) ), JSON_FORCE_OBJECT );
185
+		$config = $context->getConfig()->get('admin/extjs', array());
186
+		return json_encode(array('admin' => array('extjs' => $config)), JSON_FORCE_OBJECT);
187 187
 	}
188 188
 
189 189
 
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
 	 * @param string $lang ISO language code like "en" or "en_GB"
195 195
 	 * @return string JSON encoded translation object
196 196
 	 */
197
-	protected static function getJsonClientI18n( array $i18nPaths, $lang )
197
+	protected static function getJsonClientI18n(array $i18nPaths, $lang)
198 198
 	{
199
-		$i18n = new \Aimeos\MW\Translation\Gettext( $i18nPaths, $lang );
199
+		$i18n = new \Aimeos\MW\Translation\Gettext($i18nPaths, $lang);
200 200
 
201 201
 		$content = array(
202
-			'admin' => $i18n->getAll( 'admin' ),
203
-			'admin/ext' => $i18n->getAll( 'admin/ext' ),
202
+			'admin' => $i18n->getAll('admin'),
203
+			'admin/ext' => $i18n->getAll('admin/ext'),
204 204
 		);
205 205
 
206
-		return json_encode( $content, JSON_FORCE_OBJECT );
206
+		return json_encode($content, JSON_FORCE_OBJECT);
207 207
 	}
208 208
 
209 209
 
@@ -215,19 +215,19 @@  discard block
 block discarded – undo
215 215
 	 * @return string JSON encoded site item object
216 216
 	 * @throws Exception If no site item was found for the code
217 217
 	 */
218
-	protected static function getJsonSiteItem( \Aimeos\MShop\Context\Item\Iface $context, $site )
218
+	protected static function getJsonSiteItem(\Aimeos\MShop\Context\Item\Iface $context, $site)
219 219
 	{
220
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'locale/site' );
220
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'locale/site');
221 221
 
222 222
 		$criteria = $manager->createSearch();
223
-		$criteria->setConditions( $criteria->compare( '==', 'locale.site.code', $site ) );
224
-		$items = $manager->searchItems( $criteria );
223
+		$criteria->setConditions($criteria->compare('==', 'locale.site.code', $site));
224
+		$items = $manager->searchItems($criteria);
225 225
 
226
-		if( ( $item = reset( $items ) ) === false ) {
227
-			throw new \Exception( sprintf( 'No site found for code "%1$s"', $site ) );
226
+		if (($item = reset($items)) === false) {
227
+			throw new \Exception(sprintf('No site found for code "%1$s"', $site));
228 228
 		}
229 229
 
230
-		return json_encode( $item->toArray() );
230
+		return json_encode($item->toArray());
231 231
 	}
232 232
 
233 233
 
@@ -239,17 +239,17 @@  discard block
 block discarded – undo
239 239
 	 * @param string $locale ISO language code, e.g. "en" or "en_GB"
240 240
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
241 241
 	 */
242
-	protected static function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $locale = null )
242
+	protected static function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $locale = null)
243 243
 	{
244
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
244
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
245 245
 
246 246
 		try {
247
-			$localeItem = $localeManager->bootstrap( $sitecode, $locale, '', false );
248
-		} catch( \Aimeos\MShop\Locale\Exception $e ) {
247
+			$localeItem = $localeManager->bootstrap($sitecode, $locale, '', false);
248
+		} catch (\Aimeos\MShop\Locale\Exception $e) {
249 249
 			$localeItem = $localeManager->createItem();
250 250
 		}
251 251
 
252
-		$context->setLocale( $localeItem );
252
+		$context->setLocale($localeItem);
253 253
 
254 254
 		return $context;
255 255
 	}
Please login to merge, or discard this patch.
src/Controller/Jqadm.php 2 patches
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 	 * @param array $args Associative list of route parameters
33 33
 	 * @return ResponseInterface $response Modified response object with generated output
34 34
 	 */
35
-	public static function copyAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
35
+	public static function copyAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
36 36
 	{
37
-		$cntl = self::createClient( $container, $request, $response, $args );
38
-		return self::getHtml( $container, $response, $cntl->copy() );
37
+		$cntl = self::createClient($container, $request, $response, $args);
38
+		return self::getHtml($container, $response, $cntl->copy());
39 39
 	}
40 40
 
41 41
 
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 	 * @param array $args Associative list of route parameters
49 49
 	 * @return ResponseInterface $response Modified response object with generated output
50 50
 	 */
51
-	public static function createAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
51
+	public static function createAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
52 52
 	{
53
-		$cntl = self::createClient( $container, $request, $response, $args );
54
-		return self::getHtml( $container, $response, $cntl->create() );
53
+		$cntl = self::createClient($container, $request, $response, $args);
54
+		return self::getHtml($container, $response, $cntl->create());
55 55
 	}
56 56
 
57 57
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 	 * @param array $args Associative list of route parameters
65 65
 	 * @return ResponseInterface $response Modified response object with generated output
66 66
 	 */
67
-	public static function deleteAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
67
+	public static function deleteAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
68 68
 	{
69
-		$cntl = self::createClient( $container, $request, $response, $args );
70
-		return self::getHtml( $container, $response, $cntl->delete() . $cntl->search() );
69
+		$cntl = self::createClient($container, $request, $response, $args);
70
+		return self::getHtml($container, $response, $cntl->delete() . $cntl->search());
71 71
 	}
72 72
 
73 73
 
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 	 * @param array $args Associative list of route parameters
81 81
 	 * @return ResponseInterface $response Modified response object with generated output
82 82
 	 */
83
-	public static function getAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
83
+	public static function getAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
84 84
 	{
85
-		$cntl = self::createClient( $container, $request, $response, $args );
86
-		return self::getHtml( $container, $response, $cntl->get() );
85
+		$cntl = self::createClient($container, $request, $response, $args);
86
+		return self::getHtml($container, $response, $cntl->get());
87 87
 	}
88 88
 
89 89
 
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 	 * @param array $args Associative list of route parameters
97 97
 	 * @return ResponseInterface $response Modified response object with generated output
98 98
 	 */
99
-	public static function saveAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
99
+	public static function saveAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
100 100
 	{
101
-		$cntl = self::createClient( $container, $request, $response, $args );
102
-		return self::getHtml( $container, $response, ( $cntl->save() ? : $cntl->search() ) );
101
+		$cntl = self::createClient($container, $request, $response, $args);
102
+		return self::getHtml($container, $response, ($cntl->save() ?: $cntl->search()));
103 103
 	}
104 104
 
105 105
 
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
 	 * @param array $args Associative list of route parameters
113 113
 	 * @return ResponseInterface $response Modified response object with generated output
114 114
 	 */
115
-	public static function searchAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
115
+	public static function searchAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
116 116
 	{
117
-		$cntl = self::createClient( $container, $request, $response, $args );
118
-		return self::getHtml( $container, $response, $cntl->search() );
117
+		$cntl = self::createClient($container, $request, $response, $args);
118
+		return self::getHtml($container, $response, $cntl->search());
119 119
 	}
120 120
 
121 121
 
@@ -128,21 +128,21 @@  discard block
 block discarded – undo
128 128
 	 * @param array $args Associative list of route parameters
129 129
 	 * @return \Aimeos\Admin\JQAdm\Iface JQAdm client
130 130
 	 */
131
-	protected static function createClient( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
131
+	protected static function createClient(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
132 132
 	{
133
-		$resource = ( isset( $args['resource'] ) ? $args['resource'] : null );
134
-		$site = ( isset( $args['site'] ) ? $args['site'] : 'default' );
135
-		$lang = ( isset( $args['lang'] ) ? $args['lang'] : 'en' );
133
+		$resource = (isset($args['resource']) ? $args['resource'] : null);
134
+		$site = (isset($args['site']) ? $args['site'] : 'default');
135
+		$lang = (isset($args['lang']) ? $args['lang'] : 'en');
136 136
 
137
-		$templatePaths = $container->get( 'aimeos' )->getCustomPaths( 'admin/jqadm/templates' );
137
+		$templatePaths = $container->get('aimeos')->getCustomPaths('admin/jqadm/templates');
138 138
 
139
-		$context = $container->get( 'aimeos_context' )->get( false, $args );
140
-		$context = self::setLocale( $container->get( 'aimeos_i18n' ), $context, $site, $lang );
139
+		$context = $container->get('aimeos_context')->get(false, $args);
140
+		$context = self::setLocale($container->get('aimeos_i18n'), $context, $site, $lang);
141 141
 
142
-		$view = $container->get( 'aimeos_view' )->create( $request, $response, $args, $templatePaths, $lang );
143
-		$context->setView( $view );
142
+		$view = $container->get('aimeos_view')->create($request, $response, $args, $templatePaths, $lang);
143
+		$context->setView($view);
144 144
 
145
-		return \Aimeos\Admin\JQAdm\Factory::createClient( $context, $templatePaths, $resource );
145
+		return \Aimeos\Admin\JQAdm\Factory::createClient($context, $templatePaths, $resource);
146 146
 	}
147 147
 
148 148
 
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
 	 * @param string $content Content from admin client
155 155
 	 * @return \Illuminate\Contracts\View\View View for rendering the output
156 156
 	 */
157
-	protected static function getHtml( ContainerInterface $container, ResponseInterface $response, $content )
157
+	protected static function getHtml(ContainerInterface $container, ResponseInterface $response, $content)
158 158
 	{
159 159
 		$version = \Aimeos\Slim\Bootstrap::getVersion();
160
-		$content = str_replace( array( '{type}', '{version}' ), array( 'Slim', $version ), $content );
160
+		$content = str_replace(array('{type}', '{version}'), array('Slim', $version), $content);
161 161
 
162
-		return $container->get( 'view' )->render( $response, 'Jqadm/index.html.twig', array( 'content' => $content ) );
162
+		return $container->get('view')->render($response, 'Jqadm/index.html.twig', array('content' => $content));
163 163
 	}
164 164
 
165 165
 
@@ -172,23 +172,23 @@  discard block
 block discarded – undo
172 172
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
173 173
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
174 174
 	 */
175
-	protected static function setLocale( \Aimeos\Slim\Base\I18n $i18n, \Aimeos\MShop\Context\Item\Iface $context, $site, $lang )
175
+	protected static function setLocale(\Aimeos\Slim\Base\I18n $i18n, \Aimeos\MShop\Context\Item\Iface $context, $site, $lang)
176 176
 	{
177
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
177
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
178 178
 
179 179
 		try
180 180
 		{
181
-			$localeItem = $localeManager->bootstrap( $site, '', '', false );
182
-			$localeItem->setLanguageId( null );
183
-			$localeItem->setCurrencyId( null );
181
+			$localeItem = $localeManager->bootstrap($site, '', '', false);
182
+			$localeItem->setLanguageId(null);
183
+			$localeItem->setCurrencyId(null);
184 184
 		}
185
-		catch( \Aimeos\MShop\Locale\Exception $e )
185
+		catch (\Aimeos\MShop\Locale\Exception $e)
186 186
 		{
187 187
 			$localeItem = $localeManager->createItem();
188 188
 		}
189 189
 
190
-		$context->setLocale( $localeItem );
191
-		$context->setI18n( $i18n->get( array( $lang, 'en' ) ) );
190
+		$context->setLocale($localeItem);
191
+		$context->setI18n($i18n->get(array($lang, 'en')));
192 192
 
193 193
 		return $context;
194 194
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,8 +216,7 @@
 block discarded – undo
216 216
 			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
217 217
 			$localeItem->setLanguageId( null );
218 218
 			$localeItem->setCurrencyId( null );
219
-		}
220
-		catch( \Aimeos\MShop\Locale\Exception $e )
219
+		} catch( \Aimeos\MShop\Locale\Exception $e )
221 220
 		{
222 221
 			$localeItem = $localeManager->createItem();
223 222
 		}
Please login to merge, or discard this patch.
src/Controller/Jsonadm.php 2 patches
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 	 * @param array $args Associative list of route parameters
33 33
 	 * @return ResponseInterface $response Modified response object with generated output
34 34
 	 */
35
-	public static function deleteAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
35
+	public static function deleteAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
36 36
 	{
37 37
 		$status = 500;
38 38
 		$header = $request->getHeaders();
39 39
 
40
-		$cntl = self::createController( $container, $request, $response, $args );
41
-		$result = $cntl->delete( (string) $request->getBody(), $header, $status );
40
+		$cntl = self::createController($container, $request, $response, $args);
41
+		$result = $cntl->delete((string) $request->getBody(), $header, $status);
42 42
 
43
-		return self::withResponse( $response, $result, $status, $header );
43
+		return self::withResponse($response, $result, $status, $header);
44 44
 	}
45 45
 
46 46
 
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
 	 * @param array $args Associative list of route parameters
54 54
 	 * @return ResponseInterface $response Modified response object with generated output
55 55
 	 */
56
-	public static function getAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
56
+	public static function getAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
57 57
 	{
58 58
 		$status = 500;
59 59
 		$header = $request->getHeaders();
60 60
 
61
-		$cntl = self::createController( $container, $request, $response, $args );
62
-		$result = $cntl->get( (string) $request->getBody(), $header, $status );
61
+		$cntl = self::createController($container, $request, $response, $args);
62
+		$result = $cntl->get((string) $request->getBody(), $header, $status);
63 63
 
64
-		return self::withResponse( $response, $result, $status, $header );
64
+		return self::withResponse($response, $result, $status, $header);
65 65
 	}
66 66
 
67 67
 
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 	 * @param array $args Associative list of route parameters
75 75
 	 * @return ResponseInterface $response Modified response object with generated output
76 76
 	 */
77
-	public static function patchAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
77
+	public static function patchAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
78 78
 	{
79 79
 		$status = 500;
80 80
 		$header = $request->getHeaders();
81 81
 
82
-		$cntl = self::createController( $container, $request, $response, $args );
83
-		$result = $cntl->patch( (string) $request->getBody(), $header, $status );
82
+		$cntl = self::createController($container, $request, $response, $args);
83
+		$result = $cntl->patch((string) $request->getBody(), $header, $status);
84 84
 
85
-		return self::withResponse( $response, $result, $status, $header );
85
+		return self::withResponse($response, $result, $status, $header);
86 86
 	}
87 87
 
88 88
 
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
 	 * @param array $args Associative list of route parameters
96 96
 	 * @return ResponseInterface $response Modified response object with generated output
97 97
 	 */
98
-	public static function postAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
98
+	public static function postAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
99 99
 	{
100 100
 		$status = 500;
101 101
 		$header = $request->getHeaders();
102 102
 
103
-		$cntl = self::createController( $container, $request, $response, $args );
104
-		$result = $cntl->post( (string) $request->getBody(), $header, $status );
103
+		$cntl = self::createController($container, $request, $response, $args);
104
+		$result = $cntl->post((string) $request->getBody(), $header, $status);
105 105
 
106
-		return self::withResponse( $response, $result, $status, $header );
106
+		return self::withResponse($response, $result, $status, $header);
107 107
 	}
108 108
 
109 109
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
 	 * @param array $args Associative list of route parameters
117 117
 	 * @return ResponseInterface $response Modified response object with generated output
118 118
 	 */
119
-	public static function putAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
119
+	public static function putAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
120 120
 	{
121 121
 		$status = 500;
122 122
 		$header = $request->getHeaders();
123 123
 
124
-		$cntl = self::createController( $container, $request, $response, $args );
125
-		$result = $cntl->put( (string) $request->getBody(), $header, $status );
124
+		$cntl = self::createController($container, $request, $response, $args);
125
+		$result = $cntl->put((string) $request->getBody(), $header, $status);
126 126
 
127
-		return self::withResponse( $response, $result, $status, $header );
127
+		return self::withResponse($response, $result, $status, $header);
128 128
 	}
129 129
 
130 130
 
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 	 * @param array $args Associative list of route parameters
138 138
 	 * @return ResponseInterface $response Modified response object with generated output
139 139
 	 */
140
-	public static function optionsAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
140
+	public static function optionsAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
141 141
 	{
142 142
 		$status = 500;
143 143
 		$header = $request->getHeaders();
144 144
 
145
-		$cntl = self::createController( $container, $request, $response, $args );
146
-		$result = $cntl->options( (string) $request->getBody(), $header, $status );
145
+		$cntl = self::createController($container, $request, $response, $args);
146
+		$result = $cntl->options((string) $request->getBody(), $header, $status);
147 147
 
148
-		return self::withResponse( $response, $result, $status, $header );
148
+		return self::withResponse($response, $result, $status, $header);
149 149
 	}
150 150
 
151 151
 
@@ -158,21 +158,21 @@  discard block
 block discarded – undo
158 158
 	 * @param array $args Associative list of route parameters
159 159
 	 * @return \Aimeos\Controller\JsonAdm\Iface JSON admin controller
160 160
 	 */
161
-	protected static function createController( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
161
+	protected static function createController(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
162 162
 	{
163
-		$resource = ( isset( $args['resource'] ) ? $args['resource'] : null );
164
-		$site = ( isset( $args['site'] ) ? $args['site'] : 'default' );
165
-		$lang = ( isset( $args['lang'] ) ? $args['lang'] : 'en' );
163
+		$resource = (isset($args['resource']) ? $args['resource'] : null);
164
+		$site = (isset($args['site']) ? $args['site'] : 'default');
165
+		$lang = (isset($args['lang']) ? $args['lang'] : 'en');
166 166
 
167
-		$templatePaths = $container->get( 'aimeos' )->getCustomPaths( 'controller/jsonadm/templates' );
167
+		$templatePaths = $container->get('aimeos')->getCustomPaths('controller/jsonadm/templates');
168 168
 
169
-		$context = $container->get( 'aimeos_context' )->get( false, $args );
170
-		$context = self::setLocale( $container->get( 'aimeos_i18n' ), $context, $site, $lang );
169
+		$context = $container->get('aimeos_context')->get(false, $args);
170
+		$context = self::setLocale($container->get('aimeos_i18n'), $context, $site, $lang);
171 171
 
172
-		$view = $container->get( 'aimeos_view' )->create( $request, $response, $args, $templatePaths, $lang );
173
-		$context->setView( $view );
172
+		$view = $container->get('aimeos_view')->create($request, $response, $args, $templatePaths, $lang);
173
+		$context->setView($view);
174 174
 
175
-		return \Aimeos\Controller\JsonAdm\Factory::createController( $context, $templatePaths, $resource );
175
+		return \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, $resource);
176 176
 	}
177 177
 
178 178
 
@@ -185,13 +185,13 @@  discard block
 block discarded – undo
185 185
 	 * @param array $header List of HTTP headers
186 186
 	 * @return ResponseInterface $response Populated response object
187 187
 	 */
188
-	protected static function withResponse( ResponseInterface $response, $content, $status, array $header )
188
+	protected static function withResponse(ResponseInterface $response, $content, $status, array $header)
189 189
 	{
190
-		$response->getBody()->write( $content );
191
-		$response = $response->withStatus( $status );
190
+		$response->getBody()->write($content);
191
+		$response = $response->withStatus($status);
192 192
 
193
-		foreach( $header as $key => $value ) {
194
-			$response->withHeader( $key, $value );
193
+		foreach ($header as $key => $value) {
194
+			$response->withHeader($key, $value);
195 195
 		}
196 196
 
197 197
 		return $response;
@@ -207,23 +207,23 @@  discard block
 block discarded – undo
207 207
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
208 208
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
209 209
 	 */
210
-	protected static function setLocale( \Aimeos\Slim\Base\I18n $i18n, \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang )
210
+	protected static function setLocale(\Aimeos\Slim\Base\I18n $i18n, \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang)
211 211
 	{
212
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
212
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
213 213
 
214 214
 		try
215 215
 		{
216
-			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
217
-			$localeItem->setLanguageId( null );
218
-			$localeItem->setCurrencyId( null );
216
+			$localeItem = $localeManager->bootstrap($sitecode, '', '', false);
217
+			$localeItem->setLanguageId(null);
218
+			$localeItem->setCurrencyId(null);
219 219
 		}
220
-		catch( \Aimeos\MShop\Locale\Exception $e )
220
+		catch (\Aimeos\MShop\Locale\Exception $e)
221 221
 		{
222 222
 			$localeItem = $localeManager->createItem();
223 223
 		}
224 224
 
225
-		$context->setLocale( $localeItem );
226
-		$context->setI18n( $i18n->get( array( $lang ) ) );
225
+		$context->setLocale($localeItem);
226
+		$context->setI18n($i18n->get(array($lang)));
227 227
 
228 228
 		return $context;
229 229
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,8 +216,7 @@
 block discarded – undo
216 216
 			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
217 217
 			$localeItem->setLanguageId( null );
218 218
 			$localeItem->setCurrencyId( null );
219
-		}
220
-		catch( \Aimeos\MShop\Locale\Exception $e )
219
+		} catch( \Aimeos\MShop\Locale\Exception $e )
221 220
 		{
222 221
 			$localeItem = $localeManager->createItem();
223 222
 		}
Please login to merge, or discard this patch.
src/aimeos-routes.php 1 patch
Spacing   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -1,153 +1,153 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-$app->group( $config( 'routes/admin', '/admin/' ), function() {
4
+$app->group($config('routes/admin', '/admin/'), function() {
5 5
 
6
-	$this->map(['GET'], 'extadm/file', function( $request, $response, $args ) {
7
-		return \Aimeos\Slim\Controller\Extadm::fileAction( $this, $request, $response, $args );
8
-	})->setName( 'aimeos_shop_extadm_file' );
6
+	$this->map(['GET'], 'extadm/file', function($request, $response, $args) {
7
+		return \Aimeos\Slim\Controller\Extadm::fileAction($this, $request, $response, $args);
8
+	})->setName('aimeos_shop_extadm_file');
9 9
 
10
-	$this->map(['POST'], 'extadm/do', function( $request, $response, $args ) {
11
-		return \Aimeos\Slim\Controller\Extadm::doAction( $this, $request, $response, $args );
12
-	})->setName( 'aimeos_shop_extadm_json' );
10
+	$this->map(['POST'], 'extadm/do', function($request, $response, $args) {
11
+		return \Aimeos\Slim\Controller\Extadm::doAction($this, $request, $response, $args);
12
+	})->setName('aimeos_shop_extadm_json');
13 13
 
14
-	$this->map(['GET'], 'extadm[/{tab:[0-9]+}[/{lang}]]', function( $request, $response, $args ) {
15
-		return \Aimeos\Slim\Controller\Extadm::indexAction( $this, $request, $response, $args );
16
-	})->setName( 'aimeos_shop_extadm' );
14
+	$this->map(['GET'], 'extadm[/{tab:[0-9]+}[/{lang}]]', function($request, $response, $args) {
15
+		return \Aimeos\Slim\Controller\Extadm::indexAction($this, $request, $response, $args);
16
+	})->setName('aimeos_shop_extadm');
17 17
 
18 18
 
19
-	$this->map(['GET', 'POST'], 'jqadm/copy/{resource:[^0-9]+}/{id:[0-9]+}', function( $request, $response, $args ) {
20
-		return \Aimeos\Slim\Controller\Jqadm::copyAction( $this, $request, $response, $args );
21
-	})->setName( 'aimeos_shop_jqadm_copy' );
19
+	$this->map(['GET', 'POST'], 'jqadm/copy/{resource:[^0-9]+}/{id:[0-9]+}', function($request, $response, $args) {
20
+		return \Aimeos\Slim\Controller\Jqadm::copyAction($this, $request, $response, $args);
21
+	})->setName('aimeos_shop_jqadm_copy');
22 22
 
23
-	$this->map(['GET', 'POST'], 'jqadm/create/{resource:[^0-9]+}', function( $request, $response, $args ) {
24
-		return \Aimeos\Slim\Controller\Jqadm::createAction( $this, $request, $response, $args );
25
-	})->setName( 'aimeos_shop_jqadm_create' );
23
+	$this->map(['GET', 'POST'], 'jqadm/create/{resource:[^0-9]+}', function($request, $response, $args) {
24
+		return \Aimeos\Slim\Controller\Jqadm::createAction($this, $request, $response, $args);
25
+	})->setName('aimeos_shop_jqadm_create');
26 26
 
27
-	$this->map(['GET', 'POST'], 'jqadm/delete/{resource:[^0-9]+}/{id:[0-9]+}', function( $request, $response, $args ) {
28
-		return \Aimeos\Slim\Controller\Jqadm::deleteAction( $this, $request, $response, $args );
29
-	})->setName( 'aimeos_shop_jqadm_delete' );
27
+	$this->map(['GET', 'POST'], 'jqadm/delete/{resource:[^0-9]+}/{id:[0-9]+}', function($request, $response, $args) {
28
+		return \Aimeos\Slim\Controller\Jqadm::deleteAction($this, $request, $response, $args);
29
+	})->setName('aimeos_shop_jqadm_delete');
30 30
 
31
-	$this->map(['GET'], 'jqadm/get/{resource:[^0-9]+}/{id:[0-9]+}', function( $request, $response, $args ) {
32
-		return \Aimeos\Slim\Controller\Jqadm::getAction( $this, $request, $response, $args );
33
-	})->setName( 'aimeos_shop_jqadm_get' );
31
+	$this->map(['GET'], 'jqadm/get/{resource:[^0-9]+}/{id:[0-9]+}', function($request, $response, $args) {
32
+		return \Aimeos\Slim\Controller\Jqadm::getAction($this, $request, $response, $args);
33
+	})->setName('aimeos_shop_jqadm_get');
34 34
 
35
-	$this->map(['POST'], 'jqadm/save/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
36
-		return \Aimeos\Slim\Controller\Jqadm::saveAction( $this, $request, $response, $args );
37
-	})->setName( 'aimeos_shop_jqadm_save' );
35
+	$this->map(['POST'], 'jqadm/save/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
36
+		return \Aimeos\Slim\Controller\Jqadm::saveAction($this, $request, $response, $args);
37
+	})->setName('aimeos_shop_jqadm_save');
38 38
 
39
-	$this->map(['GET', 'POST'], 'jqadm/search/{resource:[^0-9]+}', function( $request, $response, $args ) {
40
-		return \Aimeos\Slim\Controller\Jqadm::searchAction( $this, $request, $response, $args );
41
-	})->setName( 'aimeos_shop_jqadm_search' );
39
+	$this->map(['GET', 'POST'], 'jqadm/search/{resource:[^0-9]+}', function($request, $response, $args) {
40
+		return \Aimeos\Slim\Controller\Jqadm::searchAction($this, $request, $response, $args);
41
+	})->setName('aimeos_shop_jqadm_search');
42 42
 
43 43
 
44
-	$this->map(['DELETE'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
45
-		return \Aimeos\Slim\Controller\Jsonadm::deleteAction( $this, $request, $response, $args );
46
-	})->setName( 'aimeos_shop_jsonadm_delete' );
44
+	$this->map(['DELETE'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
45
+		return \Aimeos\Slim\Controller\Jsonadm::deleteAction($this, $request, $response, $args);
46
+	})->setName('aimeos_shop_jsonadm_delete');
47 47
 
48
-	$this->map(['GET'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
49
-		return \Aimeos\Slim\Controller\Jsonadm::getAction( $this, $request, $response, $args );
50
-	})->setName( 'aimeos_shop_jsonadm_get' );
48
+	$this->map(['GET'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
49
+		return \Aimeos\Slim\Controller\Jsonadm::getAction($this, $request, $response, $args);
50
+	})->setName('aimeos_shop_jsonadm_get');
51 51
 
52
-	$this->map(['PATCH'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
53
-		return \Aimeos\Slim\Controller\Jsonadm::patchAction( $this, $request, $response, $args );
54
-	})->setName( 'aimeos_shop_jsonadm_patch' );
52
+	$this->map(['PATCH'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
53
+		return \Aimeos\Slim\Controller\Jsonadm::patchAction($this, $request, $response, $args);
54
+	})->setName('aimeos_shop_jsonadm_patch');
55 55
 
56
-	$this->map(['POST'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
57
-		return \Aimeos\Slim\Controller\Jsonadm::postAction( $this, $request, $response, $args );
58
-	})->setName( 'aimeos_shop_jsonadm_post' );
56
+	$this->map(['POST'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
57
+		return \Aimeos\Slim\Controller\Jsonadm::postAction($this, $request, $response, $args);
58
+	})->setName('aimeos_shop_jsonadm_post');
59 59
 
60
-	$this->map(['PUT'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function( $request, $response, $args ) {
61
-		return \Aimeos\Slim\Controller\Jsonadm::putAction( $this, $request, $response, $args );
62
-	})->setName( 'aimeos_shop_jsonadm_put' );
60
+	$this->map(['PUT'], 'jsonadm/{resource:[^0-9]+}[/{id:[0-9]+}]', function($request, $response, $args) {
61
+		return \Aimeos\Slim\Controller\Jsonadm::putAction($this, $request, $response, $args);
62
+	})->setName('aimeos_shop_jsonadm_put');
63 63
 
64
-	$this->map(['OPTIONS'], 'jsonadm/[{resource}]', function( $request, $response, $args ) {
65
-		return \Aimeos\Slim\Controller\Jsonadm::optionsAction( $this, $request, $response, $args );
66
-	})->setName( 'aimeos_shop_jsonadm_options' );
64
+	$this->map(['OPTIONS'], 'jsonadm/[{resource}]', function($request, $response, $args) {
65
+		return \Aimeos\Slim\Controller\Jsonadm::optionsAction($this, $request, $response, $args);
66
+	})->setName('aimeos_shop_jsonadm_options');
67 67
 
68 68
 });
69 69
 
70 70
 
71
-$app->group( $config( 'routes/account', '/' ), function() {
71
+$app->group($config('routes/account', '/'), function() {
72 72
 
73
-	$this->map(['GET', 'POST'], 'myaccount', function( $request, $response, $args ) {
74
-		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
75
-	})->setName( 'aimeos_shop_account' );
73
+	$this->map(['GET', 'POST'], 'myaccount', function($request, $response, $args) {
74
+		return \Aimeos\Slim\Controller\Account::indexAction($this, $request, $response, $args);
75
+	})->setName('aimeos_shop_account');
76 76
 
77
-	$this->map(['GET', 'POST'], 'myaccount/favorite[/{fav_action}/{fav_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function( $request, $response, $args ) {
78
-		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
79
-	})->setName( 'aimeos_shop_account_favorite' );
77
+	$this->map(['GET', 'POST'], 'myaccount/favorite[/{fav_action}/{fav_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function($request, $response, $args) {
78
+		return \Aimeos\Slim\Controller\Account::indexAction($this, $request, $response, $args);
79
+	})->setName('aimeos_shop_account_favorite');
80 80
 
81
-	$this->map(['GET', 'POST'], 'myaccount/watch[/{wat_action}/{wat_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function( $request, $response, $args ) {
82
-		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
83
-	})->setName( 'aimeos_shop_account_watch' );
81
+	$this->map(['GET', 'POST'], 'myaccount/watch[/{wat_action}/{wat_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function($request, $response, $args) {
82
+		return \Aimeos\Slim\Controller\Account::indexAction($this, $request, $response, $args);
83
+	})->setName('aimeos_shop_account_watch');
84 84
 
85
-	$this->map(['GET', 'POST'], 'myaccount/download/{dl_id}', function( $request, $response, $args ) {
86
-		return \Aimeos\Slim\Controller\Account::downloadAction( $this, $request, $response, $args );
87
-	})->setName( 'aimeos_shop_account_download' );
85
+	$this->map(['GET', 'POST'], 'myaccount/download/{dl_id}', function($request, $response, $args) {
86
+		return \Aimeos\Slim\Controller\Account::downloadAction($this, $request, $response, $args);
87
+	})->setName('aimeos_shop_account_download');
88 88
 
89 89
 });
90 90
 
91 91
 
92
-$app->group( $config( 'routes/default', '/' ), function() {
92
+$app->group($config('routes/default', '/'), function() {
93 93
 
94
-	$this->map(['GET', 'POST'], 'count', function( $request, $response, $args ) {
95
-		return \Aimeos\Slim\Controller\Catalog::countAction( $this, $request, $response, $args );
96
-	})->setName( 'aimeos_shop_count' );
94
+	$this->map(['GET', 'POST'], 'count', function($request, $response, $args) {
95
+		return \Aimeos\Slim\Controller\Catalog::countAction($this, $request, $response, $args);
96
+	})->setName('aimeos_shop_count');
97 97
 
98
-	$this->map(['GET', 'POST'], 'detail/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]', function( $request, $response, $args ) {
99
-		return \Aimeos\Slim\Controller\Catalog::detailAction( $this, $request, $response, $args );
100
-	})->setName( 'aimeos_shop_detail' );
98
+	$this->map(['GET', 'POST'], 'detail/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]', function($request, $response, $args) {
99
+		return \Aimeos\Slim\Controller\Catalog::detailAction($this, $request, $response, $args);
100
+	})->setName('aimeos_shop_detail');
101 101
 
102
-	$this->map(['GET', 'POST'], 'detail/pin[/{pin_action}/{pin_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function( $request, $response, $args ) {
103
-		return \Aimeos\Slim\Controller\Catalog::detailAction( $this, $request, $response, $args );
104
-	})->setName( 'aimeos_shop_session_pinned' );
102
+	$this->map(['GET', 'POST'], 'detail/pin[/{pin_action}/{pin_id:[0-9]+}[/{d_prodid:[0-9]+}[/{d_name}[/{l_pos:[0-9]+}]]]]', function($request, $response, $args) {
103
+		return \Aimeos\Slim\Controller\Catalog::detailAction($this, $request, $response, $args);
104
+	})->setName('aimeos_shop_session_pinned');
105 105
 
106
-	$this->map(['GET', 'POST'], 'list[/{f_catid:[0-9]+}[/{f_name}]]', function( $request, $response, $args ) {
107
-		return \Aimeos\Slim\Controller\Catalog::listAction( $this, $request, $response, $args );
108
-	})->setName( 'aimeos_shop_list' );
106
+	$this->map(['GET', 'POST'], 'list[/{f_catid:[0-9]+}[/{f_name}]]', function($request, $response, $args) {
107
+		return \Aimeos\Slim\Controller\Catalog::listAction($this, $request, $response, $args);
108
+	})->setName('aimeos_shop_list');
109 109
 
110
-	$this->map(['GET', 'POST'], 'suggest', function( $request, $response, $args ) {
111
-		return \Aimeos\Slim\Controller\Catalog::suggestAction( $this, $request, $response, $args );
112
-	})->setName( 'aimeos_shop_suggest' );
110
+	$this->map(['GET', 'POST'], 'suggest', function($request, $response, $args) {
111
+		return \Aimeos\Slim\Controller\Catalog::suggestAction($this, $request, $response, $args);
112
+	})->setName('aimeos_shop_suggest');
113 113
 
114
-	$this->map(['GET', 'POST'], 'stock', function( $request, $response, $args ) {
115
-		return \Aimeos\Slim\Controller\Catalog::stockAction( $this, $request, $response, $args );
116
-	})->setName( 'aimeos_shop_stock' );
114
+	$this->map(['GET', 'POST'], 'stock', function($request, $response, $args) {
115
+		return \Aimeos\Slim\Controller\Catalog::stockAction($this, $request, $response, $args);
116
+	})->setName('aimeos_shop_stock');
117 117
 
118
-	$this->map(['GET', 'POST'], 'basket', function( $request, $response, $args ) {
119
-		return \Aimeos\Slim\Controller\Basket::indexAction( $this, $request, $response, $args );
120
-	})->setName( 'aimeos_shop_basket' );
118
+	$this->map(['GET', 'POST'], 'basket', function($request, $response, $args) {
119
+		return \Aimeos\Slim\Controller\Basket::indexAction($this, $request, $response, $args);
120
+	})->setName('aimeos_shop_basket');
121 121
 
122
-	$this->map(['GET', 'POST'], 'checkout[/{c_step}]', function( $request, $response, $args ) {
123
-		return \Aimeos\Slim\Controller\Checkout::indexAction( $this, $request, $response, $args );
124
-	})->setName( 'aimeos_shop_checkout' );
122
+	$this->map(['GET', 'POST'], 'checkout[/{c_step}]', function($request, $response, $args) {
123
+		return \Aimeos\Slim\Controller\Checkout::indexAction($this, $request, $response, $args);
124
+	})->setName('aimeos_shop_checkout');
125 125
 
126 126
 });
127 127
 
128 128
 
129
-$app->group( $config( 'routes/confirm', '/' ), function() {
129
+$app->group($config('routes/confirm', '/'), function() {
130 130
 
131
-	$this->map(['GET', 'POST'], 'confirm[/{code}[/{orderid:[0-9]+}]]', function( $request, $response, $args ) {
132
-		return \Aimeos\Slim\Controller\Checkout::confirmAction( $this, $request, $response, $args );
133
-	})->setName( 'aimeos_shop_confirm' );
131
+	$this->map(['GET', 'POST'], 'confirm[/{code}[/{orderid:[0-9]+}]]', function($request, $response, $args) {
132
+		return \Aimeos\Slim\Controller\Checkout::confirmAction($this, $request, $response, $args);
133
+	})->setName('aimeos_shop_confirm');
134 134
 
135 135
 });
136 136
 
137 137
 
138
-$app->group( $config( 'routes/update', '/' ), function() {
138
+$app->group($config('routes/update', '/'), function() {
139 139
 
140
-	$this->map(['GET', 'POST'], 'update', function( $request, $response, $args ) {
141
-		return \Aimeos\Slim\Controller\Checkout::updateAction( $this, $request, $response, $args );
142
-	})->setName( 'aimeos_shop_update' );
140
+	$this->map(['GET', 'POST'], 'update', function($request, $response, $args) {
141
+		return \Aimeos\Slim\Controller\Checkout::updateAction($this, $request, $response, $args);
142
+	})->setName('aimeos_shop_update');
143 143
 
144 144
 });
145 145
 
146 146
 
147
-$app->map(['GET', 'POST'], '/terms', function( $request, $response, $args ) {
147
+$app->map(['GET', 'POST'], '/terms', function($request, $response, $args) {
148 148
 	return 'terms';
149
-})->setName( 'aimeos_shop_terms' );
149
+})->setName('aimeos_shop_terms');
150 150
 
151
-$app->map(['GET', 'POST'], '/privacy', function( $request, $response, $args ) {
151
+$app->map(['GET', 'POST'], '/privacy', function($request, $response, $args) {
152 152
 	return 'privacy';
153
-})->setName( 'aimeos_shop_privacy' );
153
+})->setName('aimeos_shop_privacy');
Please login to merge, or discard this patch.