@@ -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 | } |
@@ -153,15 +153,13 @@ |
||
153 | 153 | |
154 | 154 | $interval = new \DateInterval( $item->getInterval() ); |
155 | 155 | $item->setDateNext( date_create( $item->getTimeCreated() )->add( $interval )->format( 'Y-m-d' ) ); |
156 | - } |
|
157 | - elseif( $item->getTimeCreated() < $date ) |
|
156 | + } elseif( $item->getTimeCreated() < $date ) |
|
158 | 157 | { |
159 | 158 | $item->setStatus( 0 ); |
160 | 159 | } |
161 | 160 | |
162 | 161 | $manager->saveItem( $item ); |
163 | - } |
|
164 | - catch( \Exception $e ) |
|
162 | + } catch( \Exception $e ) |
|
165 | 163 | { |
166 | 164 | $msg = 'Unable to process subscription with ID "%1$S": %2$s'; |
167 | 165 | $logger->log( sprintf( $msg, $item->getId(), $e->getMessage() ) ); |
@@ -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 by delivery service "%1$s": %2$s'; |
134 | 133 | $context->getLogger()->log( sprintf( $str, $serviceItem->getLabel(), $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() ) ); |
@@ -87,8 +87,7 @@ |
||
87 | 87 | foreach( $manager->searchItems( $search ) as $item ) { |
88 | 88 | $this->listTypes[$item->getCode()] = $item->getCode(); |
89 | 89 | } |
90 | - } |
|
91 | - else |
|
90 | + } else |
|
92 | 91 | { |
93 | 92 | $this->listTypes = array_flip( $this->listTypes ); |
94 | 93 | } |
@@ -91,8 +91,7 @@ |
||
91 | 91 | { |
92 | 92 | $item = $propMap[$value][$type]; |
93 | 93 | unset( $items[ $item->getId() ] ); |
94 | - } |
|
95 | - else |
|
94 | + } else |
|
96 | 95 | { |
97 | 96 | $item = $manager->createItem()->setType( $type ); |
98 | 97 | } |
@@ -81,8 +81,7 @@ discard block |
||
81 | 81 | foreach( $manager->searchItems( $search ) as $item ) { |
82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
83 | 83 | } |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
88 | 87 | } |
@@ -164,8 +163,7 @@ discard block |
||
164 | 163 | { |
165 | 164 | $listItem = $listMap[$catid][$listtype]; |
166 | 165 | unset( $listItems[ $listItem->getId() ] ); |
167 | - } |
|
168 | - else |
|
166 | + } else |
|
169 | 167 | { |
170 | 168 | $listItem = $listManager->createItem()->setType( $listtype ); |
171 | 169 | } |
@@ -179,8 +177,7 @@ discard block |
||
179 | 177 | $data = $this->getObject()->process( $product, $data ); |
180 | 178 | |
181 | 179 | $manager->commit(); |
182 | - } |
|
183 | - catch( \Exception $e ) |
|
180 | + } catch( \Exception $e ) |
|
184 | 181 | { |
185 | 182 | $manager->rollback(); |
186 | 183 | throw $e; |
@@ -81,8 +81,7 @@ discard block |
||
81 | 81 | foreach( $manager->searchItems( $search ) as $item ) { |
82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
83 | 83 | } |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
88 | 87 | } |
@@ -143,8 +142,7 @@ discard block |
||
143 | 142 | $listItem = $listMap[$url][$type][$listtype]; |
144 | 143 | $refItem = $listItem->getRefItem(); |
145 | 144 | unset( $listItems[ $listItem->getId() ] ); |
146 | - } |
|
147 | - else |
|
145 | + } else |
|
148 | 146 | { |
149 | 147 | $listItem = $listManager->createItem()->setType( $listtype ); |
150 | 148 | $refItem = $manager->createItem()->setType( $type ); |
@@ -81,8 +81,7 @@ discard block |
||
81 | 81 | foreach( $manager->searchItems( $search ) as $item ) { |
82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
83 | 83 | } |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
88 | 87 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | $listItem = $listMap[$value][$type][$listtype]; |
138 | 137 | $refItem = $listItem->getRefItem(); |
139 | 138 | unset( $listItems[ $listItem->getId() ] ); |
140 | - } |
|
141 | - else |
|
139 | + } else |
|
142 | 140 | { |
143 | 141 | $listItem = $listManager->createItem()->setType( $listtype ); |
144 | 142 | $refItem = $manager->createItem()->setType( $type ); |
@@ -81,8 +81,7 @@ discard block |
||
81 | 81 | foreach( $manager->searchItems( $search ) as $item ) { |
82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
83 | 83 | } |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
88 | 87 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | $listItem = $listMap[$content][$type][$listtype]; |
138 | 137 | $refItem = $listItem->getRefItem(); |
139 | 138 | unset( $listItems[ $listItem->getId() ] ); |
140 | - } |
|
141 | - else |
|
139 | + } else |
|
142 | 140 | { |
143 | 141 | $listItem = $listManager->createItem()->setType( $listtype ); |
144 | 142 | $refItem = $manager->createItem()->setType( $type ); |