@@ -81,8 +81,7 @@ discard block |
||
| 81 | 81 | foreach( $manager->search( $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 | } |
@@ -138,8 +137,7 @@ discard block |
||
| 138 | 137 | $listItem = $listMap[$content][$type][$listtype]; |
| 139 | 138 | $refItem = $listItem->getRefItem(); |
| 140 | 139 | unset( $listItems[$listItem->getId()] ); |
| 141 | - } |
|
| 142 | - else |
|
| 140 | + } else |
|
| 143 | 141 | { |
| 144 | 142 | $listItem = $manager->createListItem()->setType( $listtype ); |
| 145 | 143 | $refItem = $refManager->create()->setType( $type ); |
@@ -162,8 +162,7 @@ |
||
| 162 | 162 | $listItem = $listMap[$url][$type][$listtype]; |
| 163 | 163 | $refItem = $listItem->getRefItem(); |
| 164 | 164 | unset( $listItems[$listItem->getId()] ); |
| 165 | - } |
|
| 166 | - else |
|
| 165 | + } else |
|
| 167 | 166 | { |
| 168 | 167 | $listItem = $manager->createListItem()->setType( $listtype ); |
| 169 | 168 | $refItem = $refManager->create()->setType( $type ); |
@@ -139,8 +139,7 @@ |
||
| 139 | 139 | $listItem = $listMap[$content][$type][$listtype]; |
| 140 | 140 | $refItem = $listItem->getRefItem(); |
| 141 | 141 | unset( $listItems[$listItem->getId()] ); |
| 142 | - } |
|
| 143 | - else |
|
| 142 | + } else |
|
| 144 | 143 | { |
| 145 | 144 | $listItem = $manager->createListItem()->setType( $listtype ); |
| 146 | 145 | $refItem = $refManager->create()->setType( $type ); |
@@ -96,8 +96,7 @@ |
||
| 96 | 96 | $files[] = $entry->getPathname(); |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | - } |
|
| 100 | - else |
|
| 99 | + } else |
|
| 101 | 100 | { |
| 102 | 101 | $files[] = $location; |
| 103 | 102 | } |
@@ -96,8 +96,7 @@ |
||
| 96 | 96 | $files[] = $entry->getPathname(); |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | - } |
|
| 100 | - else |
|
| 99 | + } else |
|
| 101 | 100 | { |
| 102 | 101 | $files[] = $location; |
| 103 | 102 | } |
@@ -592,8 +592,7 @@ |
||
| 592 | 592 | { |
| 593 | 593 | $manager->move( $item->getId(), $item->getParentId(), $parentid ); |
| 594 | 594 | $item = $manager->save( $item ); |
| 595 | - } |
|
| 596 | - else |
|
| 595 | + } else |
|
| 597 | 596 | { |
| 598 | 597 | $item = $manager->insert( $item, $parentid ); |
| 599 | 598 | } |
@@ -97,8 +97,7 @@ discard block |
||
| 97 | 97 | $files[] = $entry->getPathname(); |
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | - } |
|
| 101 | - else |
|
| 100 | + } else |
|
| 102 | 101 | { |
| 103 | 102 | $files[] = $location; |
| 104 | 103 | } |
@@ -240,7 +239,9 @@ discard block |
||
| 240 | 239 | |
| 241 | 240 | return $currentid; |
| 242 | 241 | } |
| 243 | - catch( \Aimeos\MShop\Exception $e ) {} // not found, create new |
|
| 242 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 243 | + { |
|
| 244 | +} // not found, create new |
|
| 244 | 245 | } |
| 245 | 246 | |
| 246 | 247 | $item = $this->process( $manager->create(), $node ); |
@@ -278,13 +279,11 @@ discard block |
||
| 278 | 279 | |
| 279 | 280 | $currentid = $this->importNode( $node, $domains, $parentid, $childMap ); |
| 280 | 281 | $total++; |
| 281 | - } |
|
| 282 | - elseif( $xml->nodeType === \XMLReader::ELEMENT && $xml->name === 'catalog' ) |
|
| 282 | + } elseif( $xml->nodeType === \XMLReader::ELEMENT && $xml->name === 'catalog' ) |
|
| 283 | 283 | { |
| 284 | 284 | $this->importTree( $xml, $domains, $currentid, $childMap ); |
| 285 | 285 | $childMap = []; |
| 286 | - } |
|
| 287 | - elseif( $xml->nodeType === \XMLReader::END_ELEMENT && $xml->name === 'catalog' ) |
|
| 286 | + } elseif( $xml->nodeType === \XMLReader::END_ELEMENT && $xml->name === 'catalog' ) |
|
| 288 | 287 | { |
| 289 | 288 | \Aimeos\MShop::create( $this->context(), 'catalog' )->delete( $map ); |
| 290 | 289 | break; |
@@ -154,8 +154,7 @@ |
||
| 154 | 154 | $interval = new \DateInterval( $item->getInterval() ); |
| 155 | 155 | $dateNext = date_create( $item->getTimeCreated() )->add( $interval )->format( 'Y-m-d' ); |
| 156 | 156 | $item = $item->setDateNext( $dateNext )->setPeriod( 1 ); |
| 157 | - } |
|
| 158 | - elseif( $item->getTimeCreated() < $date ) |
|
| 157 | + } elseif( $item->getTimeCreated() < $date ) |
|
| 159 | 158 | { |
| 160 | 159 | $item->setStatus( 0 ); |
| 161 | 160 | } |
@@ -124,9 +124,11 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | catch( \Exception $e ) |
| 126 | 126 | { |
| 127 | - if( $e->getCode() < 1 ) // not a soft error |
|
| 127 | + if( $e->getCode() < 1 ) { |
|
| 128 | + // not a soft error |
|
| 128 | 129 | { |
| 129 | 130 | $item->setReason( \Aimeos\MShop\Subscription\Item\Iface::REASON_PAYMENT ); |
| 131 | + } |
|
| 130 | 132 | |
| 131 | 133 | if( $end ) { |
| 132 | 134 | $item->setDateEnd( date_create()->format( 'Y-m-d' ) ); |
@@ -228,9 +230,12 @@ discard block |
||
| 228 | 230 | { |
| 229 | 231 | foreach( $codes as $code ) |
| 230 | 232 | { |
| 231 | - try { |
|
| 233 | + try |
|
| 234 | + { |
|
| 232 | 235 | $basket->addCoupon( $code ); |
| 233 | - } catch( \Aimeos\MShop\Plugin\Provider\Exception | \Aimeos\MShop\Coupon\Exception $e ) { |
|
| 236 | + } |
|
| 237 | + catch( \Aimeos\MShop\Plugin\Provider\Exception | \Aimeos\MShop\Coupon\Exception $e ) |
|
| 238 | + { |
|
| 234 | 239 | $basket->deleteCoupon( $code ); |
| 235 | 240 | } |
| 236 | 241 | } |
@@ -349,7 +354,9 @@ discard block |
||
| 349 | 354 | $context->setUserId( $baseItem->getCustomerId() ); |
| 350 | 355 | $context->setGroupIds( $customerItem->getGroups() ); |
| 351 | 356 | } |
| 352 | - catch( \Exception $e ) {} // Subscription without account |
|
| 357 | + catch( \Exception $e ) |
|
| 358 | + { |
|
| 359 | +} // Subscription without account |
|
| 353 | 360 | |
| 354 | 361 | return $context; |
| 355 | 362 | } |