@@ -259,9 +259,12 @@ discard block |
||
259 | 259 | { |
260 | 260 | foreach( $codes as $code ) |
261 | 261 | { |
262 | - try { |
|
262 | + try |
|
263 | + { |
|
263 | 264 | $basket->addCoupon( $code ); |
264 | - } catch( \Aimeos\MShop\Plugin\Provider\Exception | \Aimeos\MShop\Coupon\Exception $e ) { |
|
265 | + } |
|
266 | + catch( \Aimeos\MShop\Plugin\Provider\Exception | \Aimeos\MShop\Coupon\Exception $e ) |
|
267 | + { |
|
265 | 268 | $basket->deleteCoupon( $code ); |
266 | 269 | } |
267 | 270 | } |
@@ -380,7 +383,9 @@ discard block |
||
380 | 383 | $context->setUserId( $baseItem->getCustomerId() ); |
381 | 384 | $context->setGroupIds( $customerItem->getGroups() ); |
382 | 385 | } |
383 | - catch( \Exception $e ) {} // Subscription without account |
|
386 | + catch( \Exception $e ) |
|
387 | + { |
|
388 | +} // Subscription without account |
|
384 | 389 | |
385 | 390 | return $context; |
386 | 391 | } |
@@ -572,9 +577,11 @@ discard block |
||
572 | 577 | } |
573 | 578 | catch( \Exception $e ) |
574 | 579 | { |
575 | - if( $e->getCode() < 1 ) // not a soft error |
|
580 | + if( $e->getCode() < 1 ) { |
|
581 | + // not a soft error |
|
576 | 582 | { |
577 | 583 | $item->setReason( \Aimeos\MShop\Subscription\Item\Iface::REASON_PAYMENT ); |
584 | + } |
|
578 | 585 | |
579 | 586 | if( $this->ends() ) { |
580 | 587 | $item->setDateEnd( date_create()->format( 'Y-m-d' ) ); |