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.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -211,23 +211,19 @@  discard block
 block discarded – undo
211 211
 					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
212 212
 				}
213 213
 				$view->detailBody = $output;
214
-			}
215
-			catch( \Aimeos\Client\Html\Exception $e )
214
+			} catch( \Aimeos\Client\Html\Exception $e )
216 215
 			{
217 216
 				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
218 217
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
219
-			}
220
-			catch( \Aimeos\Controller\Frontend\Exception $e )
218
+			} catch( \Aimeos\Controller\Frontend\Exception $e )
221 219
 			{
222 220
 				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
223 221
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
224
-			}
225
-			catch( \Aimeos\MShop\Exception $e )
222
+			} catch( \Aimeos\MShop\Exception $e )
226 223
 			{
227 224
 				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
228 225
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
229
-			}
230
-			catch( \Exception $e )
226
+			} catch( \Exception $e )
231 227
 			{
232 228
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
233 229
 
@@ -261,8 +257,7 @@  discard block
 block discarded – undo
261 257
 			$html = $view->render( $view->config( $tplconf, $default ) );
262 258
 
263 259
 			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
264
-		}
265
-		else
260
+		} else
266 261
 		{
267 262
 			$html = $this->modifyBody( $html, $uid );
268 263
 		}
@@ -299,8 +294,7 @@  discard block
 block discarded – undo
299 294
 					$output .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
300 295
 				}
301 296
 				$view->detailHeader = $output;
302
-			}
303
-			catch( \Exception $e )
297
+			} catch( \Exception $e )
304 298
 			{
305 299
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
306 300
 			}
@@ -332,8 +326,7 @@  discard block
 block discarded – undo
332 326
 			$html = $view->render( $view->config( $tplconf, $default ) );
333 327
 
334 328
 			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
335
-		}
336
-		else
329
+		} else
337 330
 		{
338 331
 			$html = $this->modifyHeader( $html, $uid );
339 332
 		}
@@ -446,23 +439,19 @@  discard block
 block discarded – undo
446 439
 			$context->getSession()->set( 'aimeos/catalog/detail/params/last' . $site, $params );
447 440
 
448 441
 			parent::process();
449
-		}
450
-		catch( \Aimeos\Client\Html\Exception $e )
442
+		} catch( \Aimeos\Client\Html\Exception $e )
451 443
 		{
452 444
 			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
453 445
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
454
-		}
455
-		catch( \Aimeos\Controller\Frontend\Exception $e )
446
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
456 447
 		{
457 448
 			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
458 449
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
459
-		}
460
-		catch( \Aimeos\MShop\Exception $e )
450
+		} catch( \Aimeos\MShop\Exception $e )
461 451
 		{
462 452
 			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
463 453
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
464
-		}
465
-		catch( \Exception $e )
454
+		} catch( \Exception $e )
466 455
 		{
467 456
 			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
468 457
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Base.php 1 patch
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.
client/html/src/Client/Html/Locale/Select/Language/Standard.php 1 patch
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.
client/html/src/Client/Html/Common/Summary/Detail/Base.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 			} else {
54 54
 				$taxrates[$taxrate] = $price;
55 55
 			}
56
-		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
56
+		} catch( \Exception $e ) { ; } // if delivery service isn't available
58 57
 
59 58
 		try
60 59
 		{
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
 			} else {
67 66
 				$taxrates[$taxrate] = $price;
68 67
 			}
69
-		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
68
+		} catch( \Exception $e ) { ; } // if payment service isn't available
71 69
 
72 70
 		return $taxrates;
73 71
 	}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Basket/Standard/Standard.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -104,23 +104,19 @@  discard block
 block discarded – undo
104 104
 				$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
105 105
 			}
106 106
 			$view->standardBody = $html;
107
-		}
108
-		catch( \Aimeos\Client\Html\Exception $e )
107
+		} catch( \Aimeos\Client\Html\Exception $e )
109 108
 		{
110 109
 			$error = array( $this->getContext()->getI18n()->dt( 'client', $e->getMessage() ) );
111 110
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $error;
112
-		}
113
-		catch( \Aimeos\Controller\Frontend\Exception $e )
111
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
114 112
 		{
115 113
 			$error = array( $this->getContext()->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
116 114
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $error;
117
-		}
118
-		catch( \Aimeos\MShop\Exception $e )
115
+		} catch( \Aimeos\MShop\Exception $e )
119 116
 		{
120 117
 			$error = array( $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
121 118
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $error;
122
-		}
123
-		catch( \Exception $e )
119
+		} catch( \Exception $e )
124 120
 		{
125 121
 			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
126 122
 
@@ -174,8 +170,7 @@  discard block
 block discarded – undo
174 170
 				$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
175 171
 			}
176 172
 			$view->standardHeader = $html;
177
-		}
178
-		catch( \Exception $e )
173
+		} catch( \Exception $e )
179 174
 		{
180 175
 			$this->getContext()->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
181 176
 			return '';
@@ -357,31 +352,26 @@  discard block
 block discarded – undo
357 352
 
358 353
 			$controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'basket' );
359 354
 			$controller->get()->check( \Aimeos\MShop\Order\Item\Base\Base::PARTS_PRODUCT );
360
-		}
361
-		catch( \Aimeos\Client\Html\Exception $e )
355
+		} catch( \Aimeos\Client\Html\Exception $e )
362 356
 		{
363 357
 			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
364 358
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $error;
365
-		}
366
-		catch( \Aimeos\Controller\Frontend\Exception $e )
359
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
367 360
 		{
368 361
 			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
369 362
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $error;
370
-		}
371
-		catch( \Aimeos\MShop\Plugin\Provider\Exception $e )
363
+		} catch( \Aimeos\MShop\Plugin\Provider\Exception $e )
372 364
 		{
373 365
 			$errors = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
374 366
 			$errors = array_merge( $errors, $this->translatePluginErrorCodes( $e->getErrorCodes() ) );
375 367
 
376 368
 			$view->summaryErrorCodes = $e->getErrorCodes();
377 369
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $errors;
378
-		}
379
-		catch( \Aimeos\MShop\Exception $e )
370
+		} catch( \Aimeos\MShop\Exception $e )
380 371
 		{
381 372
 			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
382 373
 			$view->standardErrorList = $view->get( 'standardErrorList', array() ) + $error;
383
-		}
384
-		catch( \Exception $e )
374
+		} catch( \Exception $e )
385 375
 		{
386 376
 			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
387 377
 
@@ -423,8 +413,7 @@  discard block
 block discarded – undo
423 413
 				$controller = $view->config( 'client/html/catalog/detail/url/controller', 'catalog' );
424 414
 				$action = $view->config( 'client/html/catalog/detail/url/action', 'detail' );
425 415
 				$config = $view->config( 'client/html/catalog/detail/url/config', array() );
426
-			}
427
-			else
416
+			} else
428 417
 			{
429 418
 				$params = $context->getSession()->get( 'aimeos/catalog/lists/params/last' . $site, array() );
430 419
 
Please login to merge, or discard this patch.
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.
client/html/src/Client/Html/Basket/Mini/Standard.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -121,23 +121,19 @@  discard block
 block discarded – undo
121 121
 					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
122 122
 				}
123 123
 				$view->miniBody = $output;
124
-			}
125
-			catch( \Aimeos\Client\Html\Exception $e )
124
+			} catch( \Aimeos\Client\Html\Exception $e )
126 125
 			{
127 126
 				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
128 127
 				$view->miniErrorList = $view->get( 'miniErrorList', array() ) + $error;
129
-			}
130
-			catch( \Aimeos\Controller\Frontend\Exception $e )
128
+			} catch( \Aimeos\Controller\Frontend\Exception $e )
131 129
 			{
132 130
 				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
133 131
 				$view->miniErrorList = $view->get( 'miniErrorList', array() ) + $error;
134
-			}
135
-			catch( \Aimeos\MShop\Exception $e )
132
+			} catch( \Aimeos\MShop\Exception $e )
136 133
 			{
137 134
 				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
138 135
 				$view->miniErrorList = $view->get( 'miniErrorList', array() ) + $error;
139
-			}
140
-			catch( \Exception $e )
136
+			} catch( \Exception $e )
141 137
 			{
142 138
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
143 139
 
@@ -170,8 +166,7 @@  discard block
 block discarded – undo
170 166
 
171 167
 			$html = $view->render( $view->config( $tplconf, $default ) );
172 168
 			$this->setBasketCached( $key, $html );
173
-		}
174
-		else
169
+		} else
175 170
 		{
176 171
 			$html = $this->modifyBody( $html, $uid );
177 172
 		}
@@ -235,13 +230,11 @@  discard block
 block discarded – undo
235 230
 
236 231
 				$html = $view->render( $view->config( $tplconf, $default ) );
237 232
 				$this->setBasketCached( $key, $html );
238
-			}
239
-			catch( \Exception $e )
233
+			} catch( \Exception $e )
240 234
 			{
241 235
 				$this->getContext()->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
242 236
 			}
243
-		}
244
-		else
237
+		} else
245 238
 		{
246 239
 			$html = $this->modifyHeader( $html, $uid );
247 240
 		}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Detail/Standard.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -211,23 +211,19 @@  discard block
 block discarded – undo
211 211
 					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
212 212
 				}
213 213
 				$view->detailBody = $output;
214
-			}
215
-			catch( \Aimeos\Client\Html\Exception $e )
214
+			} catch( \Aimeos\Client\Html\Exception $e )
216 215
 			{
217 216
 				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
218 217
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
219
-			}
220
-			catch( \Aimeos\Controller\Frontend\Exception $e )
218
+			} catch( \Aimeos\Controller\Frontend\Exception $e )
221 219
 			{
222 220
 				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
223 221
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
224
-			}
225
-			catch( \Aimeos\MShop\Exception $e )
222
+			} catch( \Aimeos\MShop\Exception $e )
226 223
 			{
227 224
 				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
228 225
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
229
-			}
230
-			catch( \Exception $e )
226
+			} catch( \Exception $e )
231 227
 			{
232 228
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
233 229
 
@@ -261,8 +257,7 @@  discard block
 block discarded – undo
261 257
 			$html = $view->render( $view->config( $tplconf, $default ) );
262 258
 
263 259
 			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
264
-		}
265
-		else
260
+		} else
266 261
 		{
267 262
 			$html = $this->modifyBody( $html, $uid );
268 263
 		}
@@ -299,8 +294,7 @@  discard block
 block discarded – undo
299 294
 					$output .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
300 295
 				}
301 296
 				$view->detailHeader = $output;
302
-			}
303
-			catch( \Exception $e )
297
+			} catch( \Exception $e )
304 298
 			{
305 299
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
306 300
 			}
@@ -332,8 +326,7 @@  discard block
 block discarded – undo
332 326
 			$html = $view->render( $view->config( $tplconf, $default ) );
333 327
 
334 328
 			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
335
-		}
336
-		else
329
+		} else
337 330
 		{
338 331
 			$html = $this->modifyHeader( $html, $uid );
339 332
 		}
@@ -446,23 +439,19 @@  discard block
 block discarded – undo
446 439
 			$context->getSession()->set( 'aimeos/catalog/detail/params/last' . $site, $params );
447 440
 
448 441
 			parent::process();
449
-		}
450
-		catch( \Aimeos\Client\Html\Exception $e )
442
+		} catch( \Aimeos\Client\Html\Exception $e )
451 443
 		{
452 444
 			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
453 445
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
454
-		}
455
-		catch( \Aimeos\Controller\Frontend\Exception $e )
446
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
456 447
 		{
457 448
 			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
458 449
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
459
-		}
460
-		catch( \Aimeos\MShop\Exception $e )
450
+		} catch( \Aimeos\MShop\Exception $e )
461 451
 		{
462 452
 			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
463 453
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
464
-		}
465
-		catch( \Exception $e )
454
+		} catch( \Exception $e )
466 455
 		{
467 456
 			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
468 457
 
Please login to merge, or discard this patch.
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.
client/html/src/Client/Html/Catalog/Base.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,13 +86,11 @@
 block discarded – undo
86 86
 			}
87 87
 
88 88
 			return $filter;
89
-		}
90
-		elseif( $catid !== '' && $catfilter === true )
89
+		} elseif( $catid !== '' && $catfilter === true )
91 90
 		{
92 91
 			$catIds = $this->getCatalogIds( $catid );
93 92
 			return $controller->createIndexFilterCategory( $catIds, $sort, $sortdir, ( $page - 1 ) * $size, $size );
94
-		}
95
-		else
93
+		} else
96 94
 		{
97 95
 			return $controller->createIndexFilter( $sort, $sortdir, ( $page - 1 ) * $size, $size );
98 96
 		}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Suggest/Standard.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@  discard block
 block discarded – undo
83 83
 				$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
84 84
 			}
85 85
 			$view->suggestBody = $html;
86
-		}
87
-		catch( \Exception $e )
86
+		} catch( \Exception $e )
88 87
 		{
89 88
 			$this->getContext()->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
90 89
 			return;
@@ -139,8 +138,7 @@  discard block
 block discarded – undo
139 138
 				$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
140 139
 			}
141 140
 			$view->suggestHeader = $html;
142
-		}
143
-		catch( \Exception $e )
141
+		} catch( \Exception $e )
144 142
 		{
145 143
 			$this->getContext()->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
146 144
 			return;
@@ -274,8 +272,7 @@  discard block
 block discarded – undo
274 272
 		try
275 273
 		{
276 274
 			parent::process();
277
-		}
278
-		catch( \Exception $e )
275
+		} catch( \Exception $e )
279 276
 		{
280 277
 			$this->getContext()->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
281 278
 		}
Please login to merge, or discard this patch.