Completed
Push — master ( df9ec1...3b492e )
by Aimeos
05:45
created
controller/frontend/src/Controller/Frontend/Service/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
 				} else {
68 68
 					unset( $this->items[$type][$id] );
69 69
 				}
70
-			}
71
-			catch( \Aimeos\MShop\Service\Exception $e )
70
+			} catch( \Aimeos\MShop\Service\Exception $e )
72 71
 			{
73 72
 				$msg = sprintf( 'Unable to create provider "%1$s" for service with ID "%2$s"', $service->getCode(), $id );
74 73
 				$this->getContext()->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::WARN );
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Catalog/Standard.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -256,6 +256,7 @@
 block discarded – undo
256 256
 	 * @param \Aimeos\MW\Criteria\Iface $filter Critera object which contains the filter conditions
257 257
 	 * @param string[] $domains Domain names of items that are associated with the products and that should be fetched too
258 258
 	 * @param integer &$total Parameter where the total number of found products will be stored in
259
+	 * @param integer $total
259 260
 	 * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface
260 261
 	 * @since 2015.08
261 262
 	 */
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Base.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 			{
161 161
 				$this->setAddress( $type, $item->toArray() );
162 162
 				$basket->deleteAddress( $type );
163
-			}
164
-			catch( \Exception $e )
163
+			} catch( \Exception $e )
165 164
 			{
166 165
 				$logger = $this->getContext()->getLogger();
167 166
 				$str = 'Error migrating address with type "%1$s" in basket to locale "%2$s": %3$s';
@@ -190,8 +189,7 @@  discard block
 block discarded – undo
190 189
 			{
191 190
 				$this->addCoupon( $code );
192 191
 				$basket->deleteCoupon( $code, true );
193
-			}
194
-			catch( \Exception $e )
192
+			} catch( \Exception $e )
195 193
 			{
196 194
 				$logger = $this->getContext()->getLogger();
197 195
 				$str = 'Error migrating coupon with code "%1$s" in basket to locale "%2$s": %3$s';
@@ -240,8 +238,7 @@  discard block
 block discarded – undo
240 238
 				);
241 239
 
242 240
 				$basket->deleteProduct( $pos );
243
-			}
244
-			catch( \Exception $e )
241
+			} catch( \Exception $e )
245 242
 			{
246 243
 				$code = $product->getProductCode();
247 244
 				$logger = $this->getContext()->getLogger();
@@ -276,8 +273,7 @@  discard block
 block discarded – undo
276 273
 
277 274
 				$this->setService( $type, $item->getServiceId(), $attributes );
278 275
 				$basket->deleteService( $type );
279
-			}
280
-			catch( \Exception $e ) { ; } // Don't notify the user as appropriate services can be added automatically
276
+			} catch( \Exception $e ) { ; } // Don't notify the user as appropriate services can be added automatically
281 277
 		}
282 278
 
283 279
 		return $errors;
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Standard.php 1 patch
Braces   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -296,17 +296,14 @@  discard block
 block discarded – undo
296 296
 		{
297 297
 			$address->copyFrom( $value );
298 298
 			$this->basket->setAddress( $address, $type );
299
-		}
300
-		else if( is_array( $value ) )
299
+		} else if( is_array( $value ) )
301 300
 		{
302 301
 			$this->setAddressFromArray( $address, $value );
303 302
 			$this->basket->setAddress( $address, $type );
304
-		}
305
-		else if( $value === null )
303
+		} else if( $value === null )
306 304
 		{
307 305
 			$this->basket->deleteAddress( $type );
308
-		}
309
-		else
306
+		} else
310 307
 		{
311 308
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( 'Invalid value for address type "%1$s"', $type ) );
312 309
 		}
@@ -446,8 +443,7 @@  discard block
 block discarded – undo
446 443
 					$orderBaseProductItem->setQuantity( $stocklevel );
447 444
 					$this->get()->addProduct( $orderBaseProductItem, $position );
448 445
 				}
449
-			}
450
-			catch( \Aimeos\MShop\Order\Exception $e ) {} // hide error if product position changed by plugin
446
+			} catch( \Aimeos\MShop\Order\Exception $e ) {} // hide error if product position changed by plugin
451 447
 		}
452 448
 
453 449
 		if( $stocklevel !== null && $stocklevel < $quantity )
@@ -596,10 +592,11 @@  discard block
 block discarded – undo
596 592
 		{
597 593
 			$msg = sprintf( 'No unique article found for selected attributes and product ID "%1$s"', $productItem->getId() );
598 594
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
599
-		}
600
-		else if( ( $result = reset( $productItems ) ) !== false ) // count == 1
595
+		} else if( ( $result = reset( $productItems ) ) !== false ) {
596
+			// count == 1
601 597
 		{
602 598
 			$productItem = $result;
599
+		}
603 600
 			$orderBaseProductItem->setProductCode( $productItem->getCode() );
604 601
 
605 602
 			$subprices = $productItem->getRefItems( 'price', 'default', 'default' );
@@ -619,10 +616,11 @@  discard block
 block discarded – undo
619 616
 
620 617
 				$attr[] = $orderAttributeItem;
621 618
 			}
622
-		}
623
-		else if( !isset( $options['variant'] ) || $options['variant'] != false ) // count == 0
619
+		} else if( !isset( $options['variant'] ) || $options['variant'] != false ) {
620
+			// count == 0
624 621
 		{
625 622
 			$msg = sprintf( 'No article found for selected attributes and product ID "%1$s"', $productItem->getId() );
623
+		}
626 624
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
627 625
 		}
628 626
 
Please login to merge, or discard this patch.