@@ -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 | } |
@@ -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 | } |
@@ -250,14 +250,23 @@ |
||
| 250 | 250 | return null; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | - $pdf = new class( PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false ) extends \TCPDF { |
|
| 253 | + $pdf = new class( PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false ) extends \TCPDF |
|
| 254 | + { |
|
| 254 | 255 | private $headerFcn; |
| 255 | 256 | private $footerFcn; |
| 256 | 257 | |
| 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; } |
|
| 258 | + public function Footer() |
|
| 259 | + { |
|
| 260 | +return ( $fcn = $this->footerFcn ) ? $fcn( $this ) : null; } |
|
| 261 | + public function Header() |
|
| 262 | + { |
|
| 263 | +return ( $fcn = $this->headerFcn ) ? $fcn( $this ) : null; } |
|
| 264 | + public function setFooterFunction( \Closure $fcn ) |
|
| 265 | + { |
|
| 266 | +$this->footerFcn = $fcn; } |
|
| 267 | + public function setHeaderFunction( \Closure $fcn ) |
|
| 268 | + { |
|
| 269 | +$this->headerFcn = $fcn; } |
|
| 261 | 270 | }; |
| 262 | 271 | $pdf->setCreator( PDF_CREATOR ); |
| 263 | 272 | $pdf->setAuthor( 'Aimeos' ); |
@@ -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 | } |