@@ -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 | } |
@@ -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 | } |
@@ -119,8 +119,7 @@ |
||
| 119 | 119 | { |
| 120 | 120 | $capdate = date( 'Y-m-d 00:00:00', time() - 86400 * $capDays ); |
| 121 | 121 | $expr[] = $orderSearch->compare( '<=', 'order.datepayment', $capdate ); |
| 122 | - } |
|
| 123 | - else |
|
| 122 | + } else |
|
| 124 | 123 | { |
| 125 | 124 | $expr[] = $orderSearch->compare( '==', 'order.statusdelivery', $status ); |
| 126 | 125 | } |
@@ -155,7 +155,9 @@ |
||
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | - catch( \Exception $e ) { ; } // no price available |
|
| 158 | + catch( \Exception $e ) |
|
| 159 | + { |
|
| 160 | +; } // no price available |
|
| 159 | 161 | } |
| 160 | 162 | |
| 161 | 163 | return $result; |
@@ -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 | } |
@@ -125,8 +125,7 @@ |
||
| 125 | 125 | $subList = self::createControllers( $it, $context, $aimeos, $pref ); |
| 126 | 126 | |
| 127 | 127 | $list = array_merge( $list, $subList ); |
| 128 | - } |
|
| 129 | - else if( $prefix !== '' && $entry->getType() === 'file' |
|
| 128 | + } else if( $prefix !== '' && $entry->getType() === 'file' |
|
| 130 | 129 | && $entry->getBaseName( '.php' ) === 'Factory' ) |
| 131 | 130 | { |
| 132 | 131 | $list[$prefix] = self::create( $context, $aimeos, $prefix ); |
@@ -254,10 +254,18 @@ |
||
| 254 | 254 | private $headerFcn; |
| 255 | 255 | private $footerFcn; |
| 256 | 256 | |
| 257 | - public function Footer() { return ( $fcn = $this->footerFcn ) ? $fcn( $this ) : null; } |
|
| 258 | - public function Header() { return ( $fcn = $this->headerFcn ) ? $fcn( $this ) : null; } |
|
| 259 | - public function setFooterFunction( \Closure $fcn ) { $this->footerFcn = $fcn; } |
|
| 260 | - public function setHeaderFunction( \Closure $fcn ) { $this->headerFcn = $fcn; } |
|
| 257 | + public function Footer() |
|
| 258 | + { |
|
| 259 | +return ( $fcn = $this->footerFcn ) ? $fcn( $this ) : null; } |
|
| 260 | + public function Header() |
|
| 261 | + { |
|
| 262 | +return ( $fcn = $this->headerFcn ) ? $fcn( $this ) : null; } |
|
| 263 | + public function setFooterFunction( \Closure $fcn ) |
|
| 264 | + { |
|
| 265 | +$this->footerFcn = $fcn; } |
|
| 266 | + public function setHeaderFunction( \Closure $fcn ) |
|
| 267 | + { |
|
| 268 | +$this->headerFcn = $fcn; } |
|
| 261 | 269 | }; |
| 262 | 270 | $pdf->setCreator( PDF_CREATOR ); |
| 263 | 271 | $pdf->setAuthor( 'Aimeos' ); |