Completed
Push — master ( 37ef18...cbde41 )
by Aimeos
06:05
created
client/html/src/Client/Html/Catalog/Stage/Standard.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
201 201
 	 * @param array &$tags Result array for the list of tags that are associated to the output
202 202
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
203
-	 * @return string|null String including HTML tags for the header on error
203
+	 * @return string String including HTML tags for the header on error
204 204
 	 */
205 205
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
206 206
 	{
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 	 * Returns the parameters used by the html client.
394 394
 	 *
395 395
 	 * @param array $params Associative list of all parameters
396
-	 * @param array $prefixes List of prefixes the parameters must start with
396
+	 * @param string[] $prefixes List of prefixes the parameters must start with
397 397
 	 * @return array Associative list of parameters used by the html client
398 398
 	 */
399 399
 	protected function getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @since 2014.09
90 90
 	 * @category Developer
91 91
 	 */
92
-	private $subPartNames = array( 'image', 'breadcrumb', 'navigator' );
92
+	private $subPartNames = array('image', 'breadcrumb', 'navigator');
93 93
 
94 94
 	private $tags = array();
95 95
 	private $expire;
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
105 105
 	 * @return string HTML code
106 106
 	 */
107
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
107
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
108 108
 	{
109
-		$prefixes = array( 'f' );
109
+		$prefixes = array('f');
110 110
 		$context = $this->getContext();
111 111
 
112 112
 		/** client/html/catalog/stage
@@ -121,41 +121,41 @@  discard block
 block discarded – undo
121 121
 		 */
122 122
 		$confkey = 'client/html/catalog/stage';
123 123
 
124
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
124
+		if ($context->getUserId() != null || ($html = $this->getCached('body', $uid, $prefixes, $confkey)) === null)
125 125
 		{
126 126
 			$view = $this->getView();
127 127
 
128 128
 			try
129 129
 			{
130
-				$view = $this->setViewParams( $view, $tags, $expire );
130
+				$view = $this->setViewParams($view, $tags, $expire);
131 131
 
132 132
 				$output = '';
133
-				foreach( $this->getSubClients() as $subclient ) {
134
-					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
133
+				foreach ($this->getSubClients() as $subclient) {
134
+					$output .= $subclient->setView($view)->getBody($uid, $tags, $expire);
135 135
 				}
136 136
 				$view->stageBody = $output;
137 137
 			}
138
-			catch( \Aimeos\Client\Html\Exception $e )
138
+			catch (\Aimeos\Client\Html\Exception $e)
139 139
 			{
140
-				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
141
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
140
+				$error = array($context->getI18n()->dt('client', $e->getMessage()));
141
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
142 142
 			}
143
-			catch( \Aimeos\Controller\Frontend\Exception $e )
143
+			catch (\Aimeos\Controller\Frontend\Exception $e)
144 144
 			{
145
-				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
146
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
145
+				$error = array($context->getI18n()->dt('controller/frontend', $e->getMessage()));
146
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
147 147
 			}
148
-			catch( \Aimeos\MShop\Exception $e )
148
+			catch (\Aimeos\MShop\Exception $e)
149 149
 			{
150
-				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
151
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
150
+				$error = array($context->getI18n()->dt('mshop', $e->getMessage()));
151
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
152 152
 			}
153
-			catch( \Exception $e )
153
+			catch (\Exception $e)
154 154
 			{
155
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
155
+				$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
156 156
 
157
-				$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
158
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
157
+				$error = array($context->getI18n()->dt('client', 'A non-recoverable error occured'));
158
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
159 159
 			}
160 160
 
161 161
 			/** client/html/catalog/stage/standard/template-body
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
 			$tplconf = 'client/html/catalog/stage/standard/template-body';
182 182
 			$default = 'catalog/stage/body-default.php';
183 183
 
184
-			$html = $view->render( $view->config( $tplconf, $default ) );
184
+			$html = $view->render($view->config($tplconf, $default));
185 185
 
186
-			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
186
+			$this->setCached('body', $uid, $prefixes, $confkey, $html, $tags, $expire);
187 187
 		}
188 188
 		else
189 189
 		{
190
-			$html = $this->modifyBody( $html, $uid );
190
+			$html = $this->modifyBody($html, $uid);
191 191
 		}
192 192
 
193 193
 		return $html;
@@ -202,29 +202,29 @@  discard block
 block discarded – undo
202 202
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
203 203
 	 * @return string|null String including HTML tags for the header on error
204 204
 	 */
205
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
205
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
206 206
 	{
207
-		$prefixes = array( 'f' );
207
+		$prefixes = array('f');
208 208
 		$context = $this->getContext();
209 209
 		$confkey = 'client/html/catalog/stage';
210 210
 
211
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
211
+		if ($context->getUserId() != null || ($html = $this->getCached('header', $uid, $prefixes, $confkey)) === null)
212 212
 		{
213 213
 			$view = $this->getView();
214 214
 
215 215
 			try
216 216
 			{
217
-				$view = $this->setViewParams( $view, $tags, $expire );
217
+				$view = $this->setViewParams($view, $tags, $expire);
218 218
 
219 219
 				$html = '';
220
-				foreach( $this->getSubClients() as $subclient ) {
221
-					$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
220
+				foreach ($this->getSubClients() as $subclient) {
221
+					$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
222 222
 				}
223 223
 				$view->stageHeader = $html;
224 224
 			}
225
-			catch( \Exception $e )
225
+			catch (\Exception $e)
226 226
 			{
227
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
227
+				$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
228 228
 			}
229 229
 
230 230
 			/** client/html/catalog/stage/standard/template-header
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
 			$tplconf = 'client/html/catalog/stage/standard/template-header';
252 252
 			$default = 'catalog/stage/header-default.php';
253 253
 
254
-			$html = $view->render( $view->config( $tplconf, $default ) );
254
+			$html = $view->render($view->config($tplconf, $default));
255 255
 
256
-			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
256
+			$this->setCached('header', $uid, $prefixes, $confkey, $html, $tags, $expire);
257 257
 		}
258 258
 		else
259 259
 		{
260
-			$html = $this->modifyHeader( $html, $uid );
260
+			$html = $this->modifyHeader($html, $uid);
261 261
 		}
262 262
 
263 263
 		return $html;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	 * @param string|null $name Name of the sub-client (Default if null)
272 272
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
273 273
 	 */
274
-	public function getSubClient( $type, $name = null )
274
+	public function getSubClient($type, $name = null)
275 275
 	{
276 276
 		/** client/html/catalog/stage/decorators/excludes
277 277
 		 * Excludes decorators added by the "common" option from the catalog stage html client
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 		 * @see client/html/catalog/stage/decorators/excludes
347 347
 		 * @see client/html/catalog/stage/decorators/global
348 348
 		 */
349
-		return $this->createSubClient( 'catalog/stage/' . $type, $name );
349
+		return $this->createSubClient('catalog/stage/'.$type, $name);
350 350
 	}
351 351
 
352 352
 
@@ -363,28 +363,28 @@  discard block
 block discarded – undo
363 363
 		{
364 364
 			parent::process();
365 365
 		}
366
-		catch( \Aimeos\Client\Html\Exception $e )
366
+		catch (\Aimeos\Client\Html\Exception $e)
367 367
 		{
368
-			$error = array( $this->getContext()->getI18n()->dt( 'client', $e->getMessage() ) );
369
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
368
+			$error = array($this->getContext()->getI18n()->dt('client', $e->getMessage()));
369
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
370 370
 		}
371
-		catch( \Aimeos\Controller\Frontend\Exception $e )
371
+		catch (\Aimeos\Controller\Frontend\Exception $e)
372 372
 		{
373
-			$error = array( $this->getContext()->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
374
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
373
+			$error = array($this->getContext()->getI18n()->dt('controller/frontend', $e->getMessage()));
374
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
375 375
 		}
376
-		catch( \Aimeos\MShop\Exception $e )
376
+		catch (\Aimeos\MShop\Exception $e)
377 377
 		{
378
-			$error = array( $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
379
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
378
+			$error = array($this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
379
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
380 380
 		}
381
-		catch( \Exception $e )
381
+		catch (\Exception $e)
382 382
 		{
383 383
 			$context = $this->getContext();
384
-			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
384
+			$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
385 385
 
386
-			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
387
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
386
+			$error = array($context->getI18n()->dt('client', 'A non-recoverable error occured'));
387
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
388 388
 		}
389 389
 	}
390 390
 
@@ -396,15 +396,15 @@  discard block
 block discarded – undo
396 396
 	 * @param array $prefixes List of prefixes the parameters must start with
397 397
 	 * @return array Associative list of parameters used by the html client
398 398
 	 */
399
-	protected function getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
399
+	protected function getClientParams(array $params, array $prefixes = array('f', 'l', 'd', 'a'))
400 400
 	{
401
-		$list = parent::getClientParams( $params, array_merge( $prefixes, array( 'l', 'd' ) ) );
401
+		$list = parent::getClientParams($params, array_merge($prefixes, array('l', 'd')));
402 402
 
403
-		if( isset( $list['l_pos'] ) && isset( $list['d_prodid'] ) )
403
+		if (isset($list['l_pos']) && isset($list['d_prodid']))
404 404
 		{
405 405
 			$context = $this->getContext();
406 406
 			$site = $context->getLocale()->getSite()->getCode();
407
-			$list += (array) $context->getSession()->get( 'aimeos/catalog/lists/params/last/' . $site, array() );
407
+			$list += (array) $context->getSession()->get('aimeos/catalog/lists/params/last/'.$site, array());
408 408
 		}
409 409
 
410 410
 		return $list;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 	 */
419 419
 	protected function getSubClientNames()
420 420
 	{
421
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
421
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
422 422
 	}
423 423
 
424 424
 
@@ -430,26 +430,26 @@  discard block
 block discarded – undo
430 430
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
431 431
 	 * @return \Aimeos\MW\View\Iface Modified view object
432 432
 	 */
433
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
433
+	protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
434 434
 	{
435
-		if( !isset( $this->cache ) )
435
+		if (!isset($this->cache))
436 436
 		{
437
-			$params = $this->getClientParams( $view->param(), array( 'f' ) );
437
+			$params = $this->getClientParams($view->param(), array('f'));
438 438
 
439
-			if( isset( $params['f_catid'] ) && $params['f_catid'] != '' )
439
+			if (isset($params['f_catid']) && $params['f_catid'] != '')
440 440
 			{
441 441
 				$context = $this->getContext();
442 442
 				$config = $context->getConfig();
443
-				$controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
443
+				$controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
444 444
 
445
-				$default = array( 'attribute', 'media', 'text' );
445
+				$default = array('attribute', 'media', 'text');
446 446
 
447 447
 				/** client/html/catalog/domains
448 448
 				 * A list of domain names whose items should be available in the catalog view templates
449 449
 				 *
450 450
 				 * @see client/html/catalog/stage/domains
451 451
 				 */
452
-				$domains = $config->get( 'client/html/catalog/domains', $default );
452
+				$domains = $config->get('client/html/catalog/domains', $default);
453 453
 
454 454
 				/** client/html/catalog/stage/standard/domains
455 455
 				 * A list of domain names whose items should be available in the catalog stage view template
@@ -472,15 +472,15 @@  discard block
 block discarded – undo
472 472
 				 * @see client/html/catalog/detail/domains
473 473
 				 * @see client/html/catalog/lists/domains
474 474
 				 */
475
-				$domains = $config->get( 'client/html/catalog/stage/standard/domains', $domains );
476
-				$stageCatPath = $controller->getCatalogPath( $params['f_catid'], $domains );
475
+				$domains = $config->get('client/html/catalog/stage/standard/domains', $domains);
476
+				$stageCatPath = $controller->getCatalogPath($params['f_catid'], $domains);
477 477
 
478
-				if( ( $categoryItem = end( $stageCatPath ) ) !== false ) {
478
+				if (($categoryItem = end($stageCatPath)) !== false) {
479 479
 					$view->stageCurrentCatItem = $categoryItem;
480 480
 				}
481 481
 
482
-				$this->addMetaItem( $stageCatPath, 'catalog', $this->expire, $this->tags );
483
-				$this->addMetaList( array_keys( $stageCatPath ), 'catalog', $this->expire );
482
+				$this->addMetaItem($stageCatPath, 'catalog', $this->expire, $this->tags);
483
+				$this->addMetaList(array_keys($stageCatPath), 'catalog', $this->expire);
484 484
 
485 485
 				$view->stageCatPath = $stageCatPath;
486 486
 			}
@@ -490,8 +490,8 @@  discard block
 block discarded – undo
490 490
 			$this->cache = $view;
491 491
 		}
492 492
 
493
-		$expire = $this->expires( $this->expire, $expire );
494
-		$tags = array_merge( $tags, $this->tags );
493
+		$expire = $this->expires($this->expire, $expire);
494
+		$tags = array_merge($tags, $this->tags);
495 495
 
496 496
 		return $this->cache;
497 497
 	}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Base.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28 28
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30
-	 * @param \Aimeos\Client\Html\Iface $client Client object
31 30
 	 */
32 31
 	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
33 32
 	{
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @param \Aimeos\Client\Html\Iface $client Client object
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths)
33 33
 	{
34
-		parent::__construct( $context, $templatePaths );
34
+		parent::__construct($context, $templatePaths);
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Locale/Select/Language/Standard.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68 68
 	 * @return string HTML code
69 69
 	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
71 71
 	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
72
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
73 73
 
74 74
 		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+		foreach ($this->getSubClients() as $subclient) {
76
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
77 77
 		}
78 78
 		$view->languageBody = $html;
79 79
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$tplconf = 'client/html/locale/select/language/standard/template-body';
101 101
 		$default = 'locale/select/language-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
103
+		return $view->render($view->config($tplconf, $default));
104 104
 	}
105 105
 
106 106
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113 113
 	 * @return string|null String including HTML tags for the header on error
114 114
 	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
116 116
 	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
117
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
118 118
 
119 119
 		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
120
+		foreach ($this->getSubClients() as $subclient) {
121
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
122 122
 		}
123 123
 		$view->languageHeader = $html;
124 124
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/locale/select/language/standard/template-header';
147 147
 		$default = 'locale/select/language-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/locale/select/language/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the locale select language html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/locale/select/language/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'locale/select/language/' . $type, $name );
236
+		return $this->createSubClient('locale/select/language/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
 		$config = $context->getConfig();
250 250
 		$session = $context->getSession();
251 251
 
252
-		$name = $config->get( 'client/html/locale/select/language/param-name', 'loc_languageid' );
252
+		$name = $config->get('client/html/locale/select/language/param-name', 'loc_languageid');
253 253
 
254
-		if( ( $languageId = $view->param( $name ) ) !== null ) {
255
-			$session->set( 'aimeos/locale/languageid', $languageId );
254
+		if (($languageId = $view->param($name)) !== null) {
255
+			$session->set('aimeos/locale/languageid', $languageId);
256 256
 		}
257 257
 
258 258
 		parent::process();
@@ -266,6 +266,6 @@  discard block
 block discarded – undo
266 266
 	 */
267 267
 	protected function getSubClientNames()
268 268
 	{
269
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
269
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
270 270
 	}
271 271
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Summary/Detail/Base.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,47 +27,47 @@  discard block
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28 28
 	 * @return array Associative list of tax rates as key and corresponding amounts as value
29 29
 	 */
30
-	protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
30
+	protected function getTaxRates(\Aimeos\MShop\Order\Item\Base\Iface $basket)
31 31
 	{
32 32
 		$taxrates = array();
33 33
 
34
-		foreach( $basket->getProducts() as $product )
34
+		foreach ($basket->getProducts() as $product)
35 35
 		{
36 36
 			$price = clone $product->getPrice();
37 37
 			$taxrate = $price->getTaxrate();
38 38
 
39
-			if( isset( $taxrates[$taxrate] ) ) {
40
-				$taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
39
+			if (isset($taxrates[$taxrate])) {
40
+				$taxrates[$taxrate]->addItem($price, $product->getQuantity());
41 41
 			} else {
42
-				$taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
42
+				$taxrates[$taxrate] = $price->addItem($price, $product->getQuantity() - 1);
43 43
 			}
44 44
 		}
45 45
 
46 46
 		try
47 47
 		{
48
-			$price = clone $basket->getService( 'delivery' )->getPrice();
48
+			$price = clone $basket->getService('delivery')->getPrice();
49 49
 			$taxrate = $price->getTaxrate();
50 50
 
51
-			if( isset( $taxrates[$taxrate] ) ) {
52
-				$taxrates[$taxrate]->addItem( $price );
51
+			if (isset($taxrates[$taxrate])) {
52
+				$taxrates[$taxrate]->addItem($price);
53 53
 			} else {
54 54
 				$taxrates[$taxrate] = $price;
55 55
 			}
56 56
 		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
57
+		catch (\Exception $e) {; } // if delivery service isn't available
58 58
 
59 59
 		try
60 60
 		{
61
-			$price = clone $basket->getService( 'payment' )->getPrice();
61
+			$price = clone $basket->getService('payment')->getPrice();
62 62
 			$taxrate = $price->getTaxrate();
63 63
 
64
-			if( isset( $taxrates[$taxrate] ) ) {
65
-				$taxrates[$taxrate]->addItem( $price );
64
+			if (isset($taxrates[$taxrate])) {
65
+				$taxrates[$taxrate]->addItem($price);
66 66
 			} else {
67 67
 				$taxrates[$taxrate] = $price;
68 68
 			}
69 69
 		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
70
+		catch (\Exception $e) {; } // if payment service isn't available
71 71
 
72 72
 		return $taxrates;
73 73
 	}
@@ -101,6 +101,6 @@  discard block
 block discarded – undo
101 101
 		 * @category User
102 102
 		 * @category Developer
103 103
 		 */
104
-		return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
104
+		return $config->get('client/html/common/summary/detail/download/payment-status', $default);
105 105
 	}
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Iface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,5 +29,5 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @return void
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths);
33 33
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Decorator/Iface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30 30
 	 * 	and a list of relative paths inside the core or the extension as values
31 31
 	 */
32
-	public function __construct( \Aimeos\Client\Html\Iface $client,
33
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32
+	public function __construct(\Aimeos\Client\Html\Iface $client,
33
+		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths);
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Decorator/Base.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
34 34
 	 * 	and a list of relative paths inside the core or the extension as values
35 35
 	 */
36
-	public function __construct( \Aimeos\Client\Html\Iface $client,
37
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
36
+	public function __construct(\Aimeos\Client\Html\Iface $client,
37
+		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths)
38 38
 	{
39
-		parent::__construct( $context, $templatePaths );
39
+		parent::__construct($context, $templatePaths);
40 40
 
41 41
 		$this->client = $client;
42 42
 	}
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 	 * @return mixed Returns the value of the called method
51 51
 	 * @throws \Aimeos\Client\Html\Exception If method call failed
52 52
 	 */
53
-	public function __call( $name, array $param )
53
+	public function __call($name, array $param)
54 54
 	{
55
-		if( ( $result = call_user_func_array( array( $this->client, $name ), $param ) ) === false ) {
56
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Unable to call method "%1$s"', $name ) );
55
+		if (($result = call_user_func_array(array($this->client, $name), $param)) === false) {
56
+			throw new \Aimeos\Client\Html\Exception(sprintf('Unable to call method "%1$s"', $name));
57 57
 		}
58 58
 
59 59
 		return $result;
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 	 * @param string|null $name Name of the sub-client (Default if null)
68 68
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
69 69
 	 */
70
-	public function getSubClient( $type, $name = null )
70
+	public function getSubClient($type, $name = null)
71 71
 	{
72
-		return $this->client->getSubClient( $type, $name );
72
+		return $this->client->getSubClient($type, $name);
73 73
 	}
74 74
 
75 75
 
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
82 82
 	 * @return string|null String including HTML tags for the header on error
83 83
 	 */
84
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
84
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
85 85
 	{
86
-		return $this->client->getHeader( $uid, $tags, $expire );
86
+		return $this->client->getHeader($uid, $tags, $expire);
87 87
 	}
88 88
 
89 89
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
96 96
 	 * @return string HTML code
97 97
 	 */
98
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
98
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
99 99
 	{
100
-		return $this->client->getBody( $uid, $tags, $expire );
100
+		return $this->client->getBody($uid, $tags, $expire);
101 101
 	}
102 102
 
103 103
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
119 119
 	 * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
120 120
 	 */
121
-	public function setView( \Aimeos\MW\View\Iface $view )
121
+	public function setView(\Aimeos\MW\View\Iface $view)
122 122
 	{
123
-		$this->client->setView( $view );
123
+		$this->client->setView($view);
124 124
 		return $this;
125 125
 	}
126 126
 
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
133 133
 	 * @return string Modified body content
134 134
 	 */
135
-	public function modifyBody( $content, $uid )
135
+	public function modifyBody($content, $uid)
136 136
 	{
137
-		return $this->client->modifyBody( $content, $uid );
137
+		return $this->client->modifyBody($content, $uid);
138 138
 	}
139 139
 
140 140
 
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
146 146
 	 * @return string Modified header content
147 147
 	 */
148
-	public function modifyHeader( $content, $uid )
148
+	public function modifyHeader($content, $uid)
149 149
 	{
150
-		return $this->client->modifyHeader( $content, $uid );
150
+		return $this->client->modifyHeader($content, $uid);
151 151
 	}
152 152
 
153 153
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Factory/Iface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,5 +28,5 @@
 block discarded – undo
28 28
 	 * @param string $name Client name (from configuration or "Standard" if null)
29 29
 	 * @return \Aimeos\Client\Html\Iface New client object
30 30
 	 */
31
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
31
+	public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null);
32 32
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Factory/Base.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param string $classname Full name of the class for which the object should be returned
32 32
 	 * @param \Aimeos\Client\Html\Iface|null $client ExtJS client object
33 33
 	 */
34
-	public static function injectClient( $classname, \Aimeos\Client\Html\Iface $client = null )
34
+	public static function injectClient($classname, \Aimeos\Client\Html\Iface $client = null)
35 35
 	{
36 36
 		self::$objects[$classname] = $client;
37 37
 	}
@@ -47,29 +47,29 @@  discard block
 block discarded – undo
47 47
 	 * @param string $classprefix Decorator class prefix, e.g. "\Aimeos\Client\Html\Catalog\Decorator\"
48 48
 	 * @return \Aimeos\Client\Html\Iface Client object
49 49
 	 */
50
-	protected static function addDecorators( \Aimeos\MShop\Context\Item\Iface $context,
51
-		\Aimeos\Client\Html\Iface $client, array $templatePaths, array $decorators, $classprefix )
50
+	protected static function addDecorators(\Aimeos\MShop\Context\Item\Iface $context,
51
+		\Aimeos\Client\Html\Iface $client, array $templatePaths, array $decorators, $classprefix)
52 52
 	{
53 53
 		$iface = '\\Aimeos\\Client\\Html\\Common\\Decorator\\Iface';
54 54
 
55
-		foreach( $decorators as $name )
55
+		foreach ($decorators as $name)
56 56
 		{
57
-			if( ctype_alnum( $name ) === false )
57
+			if (ctype_alnum($name) === false)
58 58
 			{
59
-				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
60
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
59
+				$classname = is_string($name) ? $classprefix.$name : '<not a string>';
60
+				throw new \Aimeos\Client\Html\Exception(sprintf('Invalid class name "%1$s"', $classname));
61 61
 			}
62 62
 
63
-			$classname = $classprefix . $name;
63
+			$classname = $classprefix.$name;
64 64
 
65
-			if( class_exists( $classname ) === false ) {
66
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
65
+			if (class_exists($classname) === false) {
66
+				throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" not found', $classname));
67 67
 			}
68 68
 
69
-			$client = new $classname( $client, $context, $templatePaths );
69
+			$client = new $classname($client, $context, $templatePaths);
70 70
 
71
-			if( !( $client instanceof $iface ) ) {
72
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement "%2$s"', $classname, $iface ) );
71
+			if (!($client instanceof $iface)) {
72
+				throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" does not implement "%2$s"', $classname, $iface));
73 73
 			}
74 74
 		}
75 75
 
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 	 * @param string $path Path of the client in lower case, e.g. "catalog/detail"
87 87
 	 * @return \Aimeos\Client\Html\Iface Client object
88 88
 	 */
89
-	protected static function addClientDecorators( \Aimeos\MShop\Context\Item\Iface $context,
90
-		\Aimeos\Client\Html\Iface $client, array $templatePaths, $path )
89
+	protected static function addClientDecorators(\Aimeos\MShop\Context\Item\Iface $context,
90
+		\Aimeos\Client\Html\Iface $client, array $templatePaths, $path)
91 91
 	{
92
-		if( !is_string( $path ) || $path === '' ) {
93
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid domain "%1$s"', $path ) );
92
+		if (!is_string($path) || $path === '') {
93
+			throw new \Aimeos\Client\Html\Exception(sprintf('Invalid domain "%1$s"', $path));
94 94
 		}
95 95
 
96
-		$localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) );
96
+		$localClass = str_replace(' ', '\\', ucwords(str_replace('/', ' ', $path)));
97 97
 		$config = $context->getConfig();
98 98
 
99 99
 		/** client/html/common/decorators/default
@@ -118,26 +118,26 @@  discard block
 block discarded – undo
118 118
 		 * @since 2014.03
119 119
 		 * @category Developer
120 120
 		 */
121
-		$decorators = $config->get( 'client/html/common/decorators/default', array() );
122
-		$excludes = $config->get( 'client/html/' . $path . '/decorators/excludes', array() );
121
+		$decorators = $config->get('client/html/common/decorators/default', array());
122
+		$excludes = $config->get('client/html/'.$path.'/decorators/excludes', array());
123 123
 
124
-		foreach( $decorators as $key => $name )
124
+		foreach ($decorators as $key => $name)
125 125
 		{
126
-			if( in_array( $name, $excludes ) ) {
127
-				unset( $decorators[$key] );
126
+			if (in_array($name, $excludes)) {
127
+				unset($decorators[$key]);
128 128
 			}
129 129
 		}
130 130
 
131 131
 		$classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
132
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
132
+		$client = self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix);
133 133
 
134 134
 		$classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
135
-		$decorators = $config->get( 'client/html/' . $path . '/decorators/global', array() );
136
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
135
+		$decorators = $config->get('client/html/'.$path.'/decorators/global', array());
136
+		$client = self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix);
137 137
 
138
-		$classprefix = '\\Aimeos\\Client\\Html\\' . $localClass . '\\Decorator\\';
139
-		$decorators = $config->get( 'client/html/' . $path . '/decorators/local', array() );
140
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
138
+		$classprefix = '\\Aimeos\\Client\\Html\\'.$localClass.'\\Decorator\\';
139
+		$decorators = $config->get('client/html/'.$path.'/decorators/local', array());
140
+		$client = self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix);
141 141
 
142 142
 		return $client;
143 143
 	}
@@ -153,20 +153,20 @@  discard block
 block discarded – undo
153 153
 	 * @return \Aimeos\Client\Html\\Iface Client object
154 154
 	 * @throws \Aimeos\Client\Html\Exception If client couldn't be found or doesn't implement the interface
155 155
 	 */
156
-	protected static function createClientBase( \Aimeos\MShop\Context\Item\Iface $context, $classname, $interface, $templatePaths )
156
+	protected static function createClientBase(\Aimeos\MShop\Context\Item\Iface $context, $classname, $interface, $templatePaths)
157 157
 	{
158
-		if( isset( self::$objects[$classname] ) ) {
158
+		if (isset(self::$objects[$classname])) {
159 159
 			return self::$objects[$classname];
160 160
 		}
161 161
 
162
-		if( class_exists( $classname ) === false ) {
163
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
162
+		if (class_exists($classname) === false) {
163
+			throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" not available', $classname));
164 164
 		}
165 165
 
166
-		$client = new $classname( $context, $templatePaths );
166
+		$client = new $classname($context, $templatePaths);
167 167
 
168
-		if( !( $client instanceof $interface ) ) {
169
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface ) );
168
+		if (!($client instanceof $interface)) {
169
+			throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" does not implement interface "%2$s"', $classname, $interface));
170 170
 		}
171 171
 
172 172
 		return $client;
Please login to merge, or discard this patch.