Completed
Push — master ( 10ff4e...12c65b )
by Aimeos
02:25
created
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/Decorator/Select.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,10 +104,11 @@  discard block
 block discarded – undo
104 104
 		{
105 105
 			$msg = sprintf( 'No unique article found for selected attributes and product ID "%1$s"', $productItem->getId() );
106 106
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
107
-		}
108
-		else if( ( $result = reset( $productItems ) ) !== false ) // count == 1
107
+		} else if( ( $result = reset( $productItems ) ) !== false ) {
108
+			// count == 1
109 109
 		{
110 110
 			$productItem = $result;
111
+		}
111 112
 			$orderBaseProductItem->setProductCode( $productItem->getCode() );
112 113
 
113 114
 			$subprices = $productItem->getRefItems( 'price', 'default', 'default' );
@@ -133,10 +134,11 @@  discard block
 block discarded – undo
133 134
 
134 135
 				$attr[] = $orderAttributeItem;
135 136
 			}
136
-		}
137
-		else if( !isset( $options['variant'] ) || $options['variant'] != false ) // count == 0
137
+		} else if( !isset( $options['variant'] ) || $options['variant'] != false ) {
138
+			// count == 0
138 139
 		{
139 140
 			$msg = sprintf( 'No article found for selected attributes and product ID "%1$s"', $productItem->getId() );
141
+		}
140 142
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
141 143
 		}
142 144
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Standard.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -311,17 +311,14 @@
 block discarded – undo
311 311
 		{
312 312
 			$address->copyFrom( $value );
313 313
 			$this->get()->setAddress( $address, $type );
314
-		}
315
-		else if( is_array( $value ) )
314
+		} else if( is_array( $value ) )
316 315
 		{
317 316
 			$this->setAddressFromArray( $address, $value );
318 317
 			$this->get()->setAddress( $address, $type );
319
-		}
320
-		else if( $value === null )
318
+		} else if( $value === null )
321 319
 		{
322 320
 			$this->get()->deleteAddress( $type );
323
-		}
324
-		else
321
+		} else
325 322
 		{
326 323
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( 'Invalid value for address type "%1$s"', $type ) );
327 324
 		}
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@
 block discarded – undo
121 121
 				} else {
122 122
 					unset( $items[$id] );
123 123
 				}
124
-			}
125
-			catch( \Aimeos\MShop\Service\Exception $e )
124
+			} catch( \Aimeos\MShop\Service\Exception $e )
126 125
 			{
127 126
 				$msg = sprintf( 'Unable to create provider "%1$s" for service with ID "%2$s"', $service->getCode(), $id );
128 127
 				$this->getContext()->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::WARN );
Please login to merge, or discard this patch.