@@ -120,8 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | $capdate = date( 'Y-m-d 00:00:00', time() - 86400 * $capDays ); |
| 122 | 122 | $expr[] = $orderSearch->compare( '<=', 'order.datepayment', $capdate ); |
| 123 | - } |
|
| 124 | - else |
|
| 123 | + } else |
|
| 125 | 124 | { |
| 126 | 125 | $expr[] = $orderSearch->compare( '==', 'order.statusdelivery', $status ); |
| 127 | 126 | } |
@@ -144,8 +143,7 @@ discard block |
||
| 144 | 143 | try |
| 145 | 144 | { |
| 146 | 145 | $serviceProvider->capture( $orderItem ); |
| 147 | - } |
|
| 148 | - catch( \Exception $e ) |
|
| 146 | + } catch( \Exception $e ) |
|
| 149 | 147 | { |
| 150 | 148 | $str = 'Error while capturing payment for order with ID "%1$s": %2$s'; |
| 151 | 149 | $context->getLogger()->log( sprintf( $str, $orderItem->getId(), $e->getMessage() ) ); |
@@ -157,8 +155,7 @@ discard block |
||
| 157 | 155 | $orderSearch->setSlice( $orderStart ); |
| 158 | 156 | } |
| 159 | 157 | while( $orderCount >= $orderSearch->getSliceSize() ); |
| 160 | - } |
|
| 161 | - catch( \Exception $e ) |
|
| 158 | + } catch( \Exception $e ) |
|
| 162 | 159 | { |
| 163 | 160 | $str = 'Error while capturing payments for service with ID "%1$s": %2$s'; |
| 164 | 161 | $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
@@ -321,6 +321,7 @@ |
||
| 321 | 321 | |
| 322 | 322 | /** |
| 323 | 323 | * @param string $code |
| 324 | + * @return \Aimeos\MShop\Catalog\Item\Iface |
|
| 324 | 325 | */ |
| 325 | 326 | protected function get( $code ) |
| 326 | 327 | { |
@@ -351,8 +351,7 @@ discard block |
||
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | $container->close(); |
| 354 | - } |
|
| 355 | - catch( \Exception $e ) |
|
| 354 | + } catch( \Exception $e ) |
|
| 356 | 355 | { |
| 357 | 356 | $logger->log( 'Product import error: ' . $e->getMessage() ); |
| 358 | 357 | $logger->log( $e->getTraceAsString() ); |
@@ -540,8 +539,7 @@ discard block |
||
| 540 | 539 | } |
| 541 | 540 | |
| 542 | 541 | $manager->commit(); |
| 543 | - } |
|
| 544 | - catch( \Exception $e ) |
|
| 542 | + } catch( \Exception $e ) |
|
| 545 | 543 | { |
| 546 | 544 | $manager->rollback(); |
| 547 | 545 | |
@@ -131,8 +131,7 @@ |
||
| 131 | 131 | $data = $this->getObject()->process( $product, $data ); |
| 132 | 132 | |
| 133 | 133 | $manager->commit(); |
| 134 | - } |
|
| 135 | - catch( \Exception $e ) |
|
| 134 | + } catch( \Exception $e ) |
|
| 136 | 135 | { |
| 137 | 136 | $manager->rollback(); |
| 138 | 137 | throw $e; |
@@ -121,8 +121,7 @@ |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | $this->export( $processors, $data, $maxcnt ); |
| 124 | - } |
|
| 125 | - catch( \Exception $e ) |
|
| 124 | + } catch( \Exception $e ) |
|
| 126 | 125 | { |
| 127 | 126 | $logger->log( 'Order export error: ' . $e->getMessage() ); |
| 128 | 127 | $logger->log( $e->getTraceAsString() ); |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | * Initializes the object |
| 30 | 30 | * |
| 31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
| 32 | - * @param array $mapping Associative list of field position in CSV as key and domain item key as value |
|
| 32 | + * @param string[] $mapping Associative list of field position in CSV as key and domain item key as value |
|
| 33 | 33 | * @param \Aimeos\Controller\Common\Coupon\Import\Csv\Processor\Iface $object Decorated processor |
| 34 | 34 | */ |
| 35 | 35 | public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $mapping, |
@@ -160,8 +160,7 @@ discard block |
||
| 160 | 160 | $msg = 'Finished coupon import: %1$d successful, %2$s errors, %3$s total (%4$s)'; |
| 161 | 161 | $logger->log( sprintf( $msg, $total - $errors, $errors, $total, __CLASS__ ), \Aimeos\MW\Logger\Base::NOTICE ); |
| 162 | 162 | } |
| 163 | - } |
|
| 164 | - catch( \Exception $e ) |
|
| 163 | + } catch( \Exception $e ) |
|
| 165 | 164 | { |
| 166 | 165 | $logger->log( 'Coupon import error: ' . $e->getMessage() ); |
| 167 | 166 | $logger->log( $e->getTraceAsString() ); |
@@ -309,8 +308,7 @@ discard block |
||
| 309 | 308 | $list = $processor->process( $item, $list ); |
| 310 | 309 | |
| 311 | 310 | $manager->commit(); |
| 312 | - } |
|
| 313 | - catch( \Exception $e ) |
|
| 311 | + } catch( \Exception $e ) |
|
| 314 | 312 | { |
| 315 | 313 | $manager->rollback(); |
| 316 | 314 | |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | try |
| 67 | 67 | { |
| 68 | 68 | $serviceManager->getProvider( $serviceItem, $serviceItem->getType() )->updateAsync(); |
| 69 | - } |
|
| 70 | - catch( \Exception $e ) |
|
| 69 | + } catch( \Exception $e ) |
|
| 71 | 70 | { |
| 72 | 71 | $msg = 'Executing updateAsyc() of "%1$s" failed: %2$s'; |
| 73 | 72 | $context->getLogger()->log( sprintf( $msg, $serviceItem->getProvider(), $e->getMessage() ) ); |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | * |
| 134 | 134 | * @param array $list Associative list of key/value pairs |
| 135 | 135 | * @param string $key Key for the value to retrieve |
| 136 | - * @param mixed $default Default value if key isn't found |
|
| 136 | + * @param string $default Default value if key isn't found |
|
| 137 | 137 | * @param mixed Value for the key in the list of the default value |
| 138 | 138 | */ |
| 139 | 139 | protected function getValue( array $list, $key, $default ) |