@@ -93,8 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $interval = new \DateInterval( $item->getInterval() ); |
| 95 | 95 | $item->setDateNext( date_create()->add( $interval )->format( 'Y-m-d' ) ); |
| 96 | - } |
|
| 97 | - catch( \Exception $e ) |
|
| 96 | + } catch( \Exception $e ) |
|
| 98 | 97 | { |
| 99 | 98 | $item->setReason( \Aimeos\MShop\Subscription\Item\Iface::REASON_PAYMENT ); |
| 100 | 99 | $item->setDateEnd( date_create()->format( 'Y-m-d' ) ); |
@@ -108,8 +107,7 @@ discard block |
||
| 108 | 107 | foreach( $processors as $processor ) { |
| 109 | 108 | $processor->renew( $item, $newInvoice ); |
| 110 | 109 | } |
| 111 | - } |
|
| 112 | - catch( \Exception $e ) |
|
| 110 | + } catch( \Exception $e ) |
|
| 113 | 111 | { |
| 114 | 112 | $msg = 'Unable to process subscription with ID "%1$s": %2$s'; |
| 115 | 113 | $logger->log( sprintf( $msg, $item->getId(), $e->getMessage() ) ); |
@@ -152,8 +150,7 @@ discard block |
||
| 152 | 150 | |
| 153 | 151 | $context->setUserId( $baseItem->getCustomerId() ); |
| 154 | 152 | $context->setGroupIds( $customerItem->getGroups() ); |
| 155 | - } |
|
| 156 | - catch( \Exception $e ) {} // Subscription without account |
|
| 153 | + } catch( \Exception $e ) {} // Subscription without account |
|
| 157 | 154 | |
| 158 | 155 | return $context; |
| 159 | 156 | } |
@@ -127,8 +127,7 @@ discard block |
||
| 127 | 127 | { |
| 128 | 128 | $serviceProvider->processBatch( $orderItems ); |
| 129 | 129 | $orderManager->saveItems( $orderItems ); |
| 130 | - } |
|
| 131 | - catch( \Exception $e ) |
|
| 130 | + } catch( \Exception $e ) |
|
| 132 | 131 | { |
| 133 | 132 | $str = 'Error while processing orders: %2$s'; |
| 134 | 133 | $context->getLogger()->log( sprintf( $str, $e->getMessage() ) ); |
@@ -138,8 +137,7 @@ discard block |
||
| 138 | 137 | $orderStart += $orderCount; |
| 139 | 138 | } |
| 140 | 139 | while( $orderCount >= $orderSearch->getSliceSize() ); |
| 141 | - } |
|
| 142 | - catch( \Exception $e ) |
|
| 140 | + } catch( \Exception $e ) |
|
| 143 | 141 | { |
| 144 | 142 | $str = 'Error while processing service with ID "%1$s": %2$s'; |
| 145 | 143 | $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
@@ -108,8 +108,7 @@ |
||
| 108 | 108 | $listItem = $listMap[$content][$type][$typecode]; |
| 109 | 109 | $refItem = $listItem->getRefItem(); |
| 110 | 110 | unset( $listItems[ $listItem->getId() ] ); |
| 111 | - } |
|
| 112 | - else |
|
| 111 | + } else |
|
| 113 | 112 | { |
| 114 | 113 | $listItem = $listManager->createItem( $typecode, 'text' ); |
| 115 | 114 | $refItem = $manager->createItem( $type, 'catalog' ); |
@@ -112,8 +112,7 @@ |
||
| 112 | 112 | $listItem = $listMap[$url][$type][$typecode]; |
| 113 | 113 | $refItem = $listItem->getRefItem(); |
| 114 | 114 | unset( $listItems[ $listItem->getId() ] ); |
| 115 | - } |
|
| 116 | - else |
|
| 115 | + } else |
|
| 117 | 116 | { |
| 118 | 117 | $listItem = $listManager->createItem( $typecode, 'media' ); |
| 119 | 118 | $refItem = $manager->createItem( $type, 'catalog' ); |
@@ -65,8 +65,7 @@ |
||
| 65 | 65 | { |
| 66 | 66 | $item = $propMap[$value][$typecode]; |
| 67 | 67 | unset( $items[ $item->getId() ] ); |
| 68 | - } |
|
| 69 | - else |
|
| 68 | + } else |
|
| 70 | 69 | { |
| 71 | 70 | $item = $manager->createItem( $typecode, 'product' ); |
| 72 | 71 | } |
@@ -114,8 +114,7 @@ |
||
| 114 | 114 | $listItem = $listMap[$url][$type][$typecode]; |
| 115 | 115 | $refItem = $listItem->getRefItem(); |
| 116 | 116 | unset( $listItems[ $listItem->getId() ] ); |
| 117 | - } |
|
| 118 | - else |
|
| 117 | + } else |
|
| 119 | 118 | { |
| 120 | 119 | $listItem = $listManager->createItem( $typecode, 'media' ); |
| 121 | 120 | $refItem = $manager->createItem( $type, 'product' ); |
@@ -108,8 +108,7 @@ |
||
| 108 | 108 | $listItem = $listMap[$value][$type][$typecode]; |
| 109 | 109 | $refItem = $listItem->getRefItem(); |
| 110 | 110 | unset( $listItems[ $listItem->getId() ] ); |
| 111 | - } |
|
| 112 | - else |
|
| 111 | + } else |
|
| 113 | 112 | { |
| 114 | 113 | $listItem = $listManager->createItem( $typecode, 'price' ); |
| 115 | 114 | $refItem = $manager->createItem( $type, 'product' ); |
@@ -146,8 +146,7 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | $listItem = $listMap[$catid][$type]; |
| 148 | 148 | unset( $listItems[ $listItem->getId() ] ); |
| 149 | - } |
|
| 150 | - else |
|
| 149 | + } else |
|
| 151 | 150 | { |
| 152 | 151 | $listItem = $listManager->createItem( $type, 'product' ); |
| 153 | 152 | } |
@@ -161,8 +160,7 @@ discard block |
||
| 161 | 160 | $data = $this->getObject()->process( $product, $data ); |
| 162 | 161 | |
| 163 | 162 | $manager->commit(); |
| 164 | - } |
|
| 165 | - catch( \Exception $e ) |
|
| 163 | + } catch( \Exception $e ) |
|
| 166 | 164 | { |
| 167 | 165 | $manager->rollback(); |
| 168 | 166 | throw $e; |
@@ -108,8 +108,7 @@ |
||
| 108 | 108 | $listItem = $listMap[$content][$type][$typecode]; |
| 109 | 109 | $refItem = $listItem->getRefItem(); |
| 110 | 110 | unset( $listItems[ $listItem->getId() ] ); |
| 111 | - } |
|
| 112 | - else |
|
| 111 | + } else |
|
| 113 | 112 | { |
| 114 | 113 | $listItem = $listManager->createItem( $typecode, 'text' ); |
| 115 | 114 | $refItem = $manager->createItem( $type, 'product' ); |