@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getName() |
| 31 | 31 | { |
| 32 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Order delivery related e-mails' ); |
|
| 32 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Order delivery related e-mails'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function getDescription() |
| 42 | 42 | { |
| 43 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Sends order delivery status update e-mails' ); |
|
| 43 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Sends order delivery status update e-mails'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -57,16 +57,16 @@ discard block |
||
| 57 | 57 | $mailer = $context->getMail(); |
| 58 | 58 | $view = $context->getView(); |
| 59 | 59 | |
| 60 | - $templatePaths = $aimeos->getCustomPaths( 'client/html/templates' ); |
|
| 60 | + $templatePaths = $aimeos->getCustomPaths('client/html/templates'); |
|
| 61 | 61 | |
| 62 | - $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config ); |
|
| 63 | - $view->addHelper( 'config', $helper ); |
|
| 62 | + $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config); |
|
| 63 | + $view->addHelper('config', $helper); |
|
| 64 | 64 | |
| 65 | - $client = \Aimeos\Client\Html\Email\Delivery\Factory::createClient( $context, $templatePaths ); |
|
| 65 | + $client = \Aimeos\Client\Html\Email\Delivery\Factory::createClient($context, $templatePaths); |
|
| 66 | 66 | |
| 67 | - $orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( $context ); |
|
| 68 | - $orderStatusManager = $orderManager->getSubManager( 'status' ); |
|
| 69 | - $orderBaseManager = $orderManager->getSubManager( 'base' ); |
|
| 67 | + $orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager($context); |
|
| 68 | + $orderStatusManager = $orderManager->getSubManager('status'); |
|
| 69 | + $orderBaseManager = $orderManager->getSubManager('base'); |
|
| 70 | 70 | |
| 71 | 71 | /** controller/jobs/order/email/delivery/standard/limit-days |
| 72 | 72 | * Only send delivery e-mails of orders that were created in the past within the configured number of days |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | * @see controller/jobs/order/email/payment/standard/limit-days |
| 85 | 85 | * @see controller/jobs/service/delivery/process/limit-days |
| 86 | 86 | */ |
| 87 | - $limit = $config->get( 'controller/jobs/order/email/delivery/standard/limit-days', 90 ); |
|
| 88 | - $limitDate = date( 'Y-m-d H:i:s', time() - $limit * 86400 ); |
|
| 87 | + $limit = $config->get('controller/jobs/order/email/delivery/standard/limit-days', 90); |
|
| 88 | + $limitDate = date('Y-m-d H:i:s', time() - $limit * 86400); |
|
| 89 | 89 | |
| 90 | 90 | $default = array( |
| 91 | 91 | \Aimeos\MShop\Order\Item\Base::STAT_PROGRESS, |
@@ -118,75 +118,75 @@ discard block |
||
| 118 | 118 | * @see controller/jobs/order/email/payment/standard/status |
| 119 | 119 | * @see controller/jobs/order/email/delivery/standard/limit-days |
| 120 | 120 | */ |
| 121 | - foreach( (array) $config->get( 'controller/jobs/order/email/delivery/standard/status', $default ) as $status ) |
|
| 121 | + foreach ((array) $config->get('controller/jobs/order/email/delivery/standard/status', $default) as $status) |
|
| 122 | 122 | { |
| 123 | 123 | $orderSearch = $orderManager->createSearch(); |
| 124 | 124 | |
| 125 | - $param = array( \Aimeos\MShop\Order\Item\Status\Base::EMAIL_DELIVERY, $status ); |
|
| 126 | - $orderFunc = $orderSearch->createFunction( 'order.containsStatus', $param ); |
|
| 125 | + $param = array(\Aimeos\MShop\Order\Item\Status\Base::EMAIL_DELIVERY, $status); |
|
| 126 | + $orderFunc = $orderSearch->createFunction('order.containsStatus', $param); |
|
| 127 | 127 | |
| 128 | 128 | $expr = array( |
| 129 | - $orderSearch->compare( '>=', 'order.mtime', $limitDate ), |
|
| 130 | - $orderSearch->compare( '==', 'order.statusdelivery', $status ), |
|
| 131 | - $orderSearch->compare( '==', $orderFunc, 0 ), |
|
| 129 | + $orderSearch->compare('>=', 'order.mtime', $limitDate), |
|
| 130 | + $orderSearch->compare('==', 'order.statusdelivery', $status), |
|
| 131 | + $orderSearch->compare('==', $orderFunc, 0), |
|
| 132 | 132 | ); |
| 133 | - $orderSearch->setConditions( $orderSearch->combine( '&&', $expr ) ); |
|
| 133 | + $orderSearch->setConditions($orderSearch->combine('&&', $expr)); |
|
| 134 | 134 | |
| 135 | 135 | $start = 0; |
| 136 | 136 | |
| 137 | 137 | do |
| 138 | 138 | { |
| 139 | - $items = $orderManager->searchItems( $orderSearch ); |
|
| 139 | + $items = $orderManager->searchItems($orderSearch); |
|
| 140 | 140 | |
| 141 | - foreach( $items as $id => $item ) |
|
| 141 | + foreach ($items as $id => $item) |
|
| 142 | 142 | { |
| 143 | 143 | try |
| 144 | 144 | { |
| 145 | - $orderBaseItem = $orderBaseManager->load( $item->getBaseId() ); |
|
| 145 | + $orderBaseItem = $orderBaseManager->load($item->getBaseId()); |
|
| 146 | 146 | |
| 147 | 147 | try { |
| 148 | - $addr = $orderBaseItem->getAddress( \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_DELIVERY ); |
|
| 149 | - } catch( \Exception $e ) { |
|
| 150 | - $addr = $orderBaseItem->getAddress( \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT ); |
|
| 148 | + $addr = $orderBaseItem->getAddress(\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_DELIVERY); |
|
| 149 | + } catch (\Exception $e) { |
|
| 150 | + $addr = $orderBaseItem->getAddress(\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $view->extAddressItem = $addr; |
| 154 | 154 | $view->extOrderBaseItem = $orderBaseItem; |
| 155 | 155 | $view->extOrderItem = $item; |
| 156 | 156 | |
| 157 | - $helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $context->getI18n( $addr->getLanguageId() ) ); |
|
| 158 | - $view->addHelper( 'translate', $helper ); |
|
| 157 | + $helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $context->getI18n($addr->getLanguageId())); |
|
| 158 | + $view->addHelper('translate', $helper); |
|
| 159 | 159 | |
| 160 | 160 | $message = $mailer->createMessage(); |
| 161 | - $helper = new \Aimeos\MW\View\Helper\Mail\Standard( $view, $message ); |
|
| 162 | - $view->addHelper( 'mail', $helper ); |
|
| 161 | + $helper = new \Aimeos\MW\View\Helper\Mail\Standard($view, $message); |
|
| 162 | + $view->addHelper('mail', $helper); |
|
| 163 | 163 | |
| 164 | - $client->setView( $view ); |
|
| 164 | + $client->setView($view); |
|
| 165 | 165 | $client->getHeader(); |
| 166 | 166 | $client->getBody(); |
| 167 | 167 | |
| 168 | - $mailer->send( $message ); |
|
| 168 | + $mailer->send($message); |
|
| 169 | 169 | |
| 170 | 170 | $statusItem = $orderStatusManager->createItem(); |
| 171 | - $statusItem->setParentId( $id ); |
|
| 172 | - $statusItem->setType( \Aimeos\MShop\Order\Item\Status\Base::EMAIL_DELIVERY ); |
|
| 173 | - $statusItem->setValue( $status ); |
|
| 171 | + $statusItem->setParentId($id); |
|
| 172 | + $statusItem->setType(\Aimeos\MShop\Order\Item\Status\Base::EMAIL_DELIVERY); |
|
| 173 | + $statusItem->setValue($status); |
|
| 174 | 174 | |
| 175 | - $orderStatusManager->saveItem( $statusItem ); |
|
| 175 | + $orderStatusManager->saveItem($statusItem); |
|
| 176 | 176 | } |
| 177 | - catch( \Exception $e ) |
|
| 177 | + catch (\Exception $e) |
|
| 178 | 178 | { |
| 179 | 179 | $str = 'Error while trying to send delivery e-mail for order ID "%1$s" and status "%2$s": %3$s'; |
| 180 | - $msg = sprintf( $str, $item->getId(), $item->getDeliveryStatus(), $e->getMessage() ); |
|
| 181 | - $context->getLogger()->log( $msg ); |
|
| 180 | + $msg = sprintf($str, $item->getId(), $item->getDeliveryStatus(), $e->getMessage()); |
|
| 181 | + $context->getLogger()->log($msg); |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - $count = count( $items ); |
|
| 185 | + $count = count($items); |
|
| 186 | 186 | $start += $count; |
| 187 | - $orderSearch->setSlice( $start ); |
|
| 187 | + $orderSearch->setSlice($start); |
|
| 188 | 188 | } |
| 189 | - while( $count >= $orderSearch->getSliceSize() ); |
|
| 189 | + while ($count >= $orderSearch->getSliceSize()); |
|
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | } |
@@ -173,8 +173,7 @@ |
||
| 173 | 173 | $statusItem->setValue( $status ); |
| 174 | 174 | |
| 175 | 175 | $orderStatusManager->saveItem( $statusItem ); |
| 176 | - } |
|
| 177 | - catch( \Exception $e ) |
|
| 176 | + } catch( \Exception $e ) |
|
| 178 | 177 | { |
| 179 | 178 | $str = 'Error while trying to send delivery e-mail for order ID "%1$s" and status "%2$s": %3$s'; |
| 180 | 179 | $msg = sprintf( $str, $item->getId(), $item->getDeliveryStatus(), $e->getMessage() ); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string|null $name Name of the controller or "Standard" if null |
| 31 | 31 | * @return \Aimeos\Controller\Jobs\Iface New controller object |
| 32 | 32 | */ |
| 33 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
| 33 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
| 34 | 34 | { |
| 35 | 35 | /** controller/jobs/order/cleanup/unpaid/name |
| 36 | 36 | * Class name of the used order cleanup unpaid scheduler controller implementation |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | * @since 2014.07 |
| 66 | 66 | * @category Developer |
| 67 | 67 | */ |
| 68 | - if( $name === null ) { |
|
| 69 | - $name = $context->getConfig()->get( 'controller/jobs/order/cleanup/unpaid/name', 'Standard' ); |
|
| 68 | + if ($name === null) { |
|
| 69 | + $name = $context->getConfig()->get('controller/jobs/order/cleanup/unpaid/name', 'Standard'); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if( ctype_alnum( $name ) === false ) |
|
| 72 | + if (ctype_alnum($name) === false) |
|
| 73 | 73 | { |
| 74 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Order\\Cleanup\\Unpaid\\' . $name : '<not a string>'; |
|
| 75 | - throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 74 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Order\\Cleanup\\Unpaid\\' . $name : '<not a string>'; |
|
| 75 | + throw new \Aimeos\Controller\Jobs\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $iface = '\\Aimeos\\Controller\\Jobs\\Iface'; |
| 79 | 79 | $classname = '\\Aimeos\\Controller\\Jobs\\Order\\Cleanup\\Unpaid\\' . $name; |
| 80 | 80 | |
| 81 | - $controller = self::createControllerBase( $context, $aimeos, $classname, $iface ); |
|
| 81 | + $controller = self::createControllerBase($context, $aimeos, $classname, $iface); |
|
| 82 | 82 | |
| 83 | 83 | /** controller/jobs/order/cleanup/unpaid/decorators/excludes |
| 84 | 84 | * Excludes decorators added by the "common" option from the order cleanup unpaid controllers |
@@ -154,6 +154,6 @@ discard block |
||
| 154 | 154 | * @see controller/jobs/order/cleanup/unpaid/decorators/excludes |
| 155 | 155 | * @see controller/jobs/order/cleanup/unpaid/decorators/global |
| 156 | 156 | */ |
| 157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'order/cleanup/unpaid' ); |
|
| 157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'order/cleanup/unpaid'); |
|
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getName() |
| 31 | 31 | { |
| 32 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Removes unpaid orders' ); |
|
| 32 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Removes unpaid orders'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function getDescription() |
| 42 | 42 | { |
| 43 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Deletes unpaid orders to keep the database clean' ); |
|
| 43 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Deletes unpaid orders to keep the database clean'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | public function run() |
| 53 | 53 | { |
| 54 | 54 | $context = $this->getContext(); |
| 55 | - $controller = \Aimeos\Controller\Common\Order\Factory::createController( $context ); |
|
| 56 | - $baseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' ); |
|
| 57 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
| 55 | + $controller = \Aimeos\Controller\Common\Order\Factory::createController($context); |
|
| 56 | + $baseManager = \Aimeos\MShop\Factory::createManager($context, 'order/base'); |
|
| 57 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
| 58 | 58 | |
| 59 | 59 | /** controller/jobs/order/cleanup/unpaid/keep-days |
| 60 | 60 | * Removes all orders from the database that are unpaid |
@@ -71,35 +71,35 @@ discard block |
||
| 71 | 71 | * @since 2014.07 |
| 72 | 72 | * @category User |
| 73 | 73 | */ |
| 74 | - $days = $context->getConfig()->get( 'controller/jobs/order/cleanup/unpaid/keep-days', 3 ); |
|
| 75 | - $limit = date( 'Y-m-d H:i:s', time() - 86400 * $days ); |
|
| 74 | + $days = $context->getConfig()->get('controller/jobs/order/cleanup/unpaid/keep-days', 3); |
|
| 75 | + $limit = date('Y-m-d H:i:s', time() - 86400 * $days); |
|
| 76 | 76 | |
| 77 | 77 | $search = $manager->createSearch(); |
| 78 | 78 | $expr = array( |
| 79 | - $search->compare( '<', 'order.mtime', $limit ), |
|
| 80 | - $search->compare( '<', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_REFUND ), |
|
| 79 | + $search->compare('<', 'order.mtime', $limit), |
|
| 80 | + $search->compare('<', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_REFUND), |
|
| 81 | 81 | ); |
| 82 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 82 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 83 | 83 | |
| 84 | 84 | $start = 0; |
| 85 | 85 | |
| 86 | 86 | do |
| 87 | 87 | { |
| 88 | 88 | $baseIds = array(); |
| 89 | - $items = $manager->searchItems( $search ); |
|
| 89 | + $items = $manager->searchItems($search); |
|
| 90 | 90 | |
| 91 | - foreach( $items as $item ) |
|
| 91 | + foreach ($items as $item) |
|
| 92 | 92 | { |
| 93 | - $controller->unblock( $item ); |
|
| 93 | + $controller->unblock($item); |
|
| 94 | 94 | $baseIds[] = $item->getBaseId(); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - $baseManager->deleteItems( $baseIds ); |
|
| 97 | + $baseManager->deleteItems($baseIds); |
|
| 98 | 98 | |
| 99 | - $count = count( $items ); |
|
| 99 | + $count = count($items); |
|
| 100 | 100 | $start += $count; |
| 101 | - $search->setSlice( $start ); |
|
| 101 | + $search->setSlice($start); |
|
| 102 | 102 | } |
| 103 | - while( $count >= $search->getSliceSize() ); |
|
| 103 | + while ($count >= $search->getSliceSize()); |
|
| 104 | 104 | } |
| 105 | 105 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string|null $name Name of the controller or "Standard" if null |
| 31 | 31 | * @return \Aimeos\Controller\Jobs\Iface New controller object |
| 32 | 32 | */ |
| 33 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
| 33 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
| 34 | 34 | { |
| 35 | 35 | /** controller/jobs/order/cleanup/unfinished/name |
| 36 | 36 | * Class name of the used order cleanup unfinished scheduler controller implementation |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | * @since 2014.03 |
| 66 | 66 | * @category Developer |
| 67 | 67 | */ |
| 68 | - if( $name === null ) { |
|
| 69 | - $name = $context->getConfig()->get( 'controller/jobs/order/cleanup/unfinished/name', 'Standard' ); |
|
| 68 | + if ($name === null) { |
|
| 69 | + $name = $context->getConfig()->get('controller/jobs/order/cleanup/unfinished/name', 'Standard'); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if( ctype_alnum( $name ) === false ) |
|
| 72 | + if (ctype_alnum($name) === false) |
|
| 73 | 73 | { |
| 74 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Order\\Cleanup\\Unfinished\\' . $name : '<not a string>'; |
|
| 75 | - throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 74 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Order\\Cleanup\\Unfinished\\' . $name : '<not a string>'; |
|
| 75 | + throw new \Aimeos\Controller\Jobs\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $iface = '\\Aimeos\\Controller\\Jobs\\Iface'; |
| 79 | 79 | $classname = '\\Aimeos\\Controller\\Jobs\\Order\\Cleanup\\Unfinished\\' . $name; |
| 80 | 80 | |
| 81 | - $controller = self::createControllerBase( $context, $aimeos, $classname, $iface ); |
|
| 81 | + $controller = self::createControllerBase($context, $aimeos, $classname, $iface); |
|
| 82 | 82 | |
| 83 | 83 | /** controller/jobs/order/cleanup/unfinished/decorators/excludes |
| 84 | 84 | * Excludes decorators added by the "common" option from the order cleanup unfinished controllers |
@@ -154,6 +154,6 @@ discard block |
||
| 154 | 154 | * @see controller/jobs/order/cleanup/unfinished/decorators/excludes |
| 155 | 155 | * @see controller/jobs/order/cleanup/unfinished/decorators/global |
| 156 | 156 | */ |
| 157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'order/cleanup/unfinished' ); |
|
| 157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'order/cleanup/unfinished'); |
|
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getName() |
| 31 | 31 | { |
| 32 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Removes unfinished orders' ); |
|
| 32 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Removes unfinished orders'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function getDescription() |
| 42 | 42 | { |
| 43 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Deletes unfinished orders an makes their products and coupon codes available again' ); |
|
| 43 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Deletes unfinished orders an makes their products and coupon codes available again'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | public function run() |
| 53 | 53 | { |
| 54 | 54 | $context = $this->getContext(); |
| 55 | - $controller = \Aimeos\Controller\Common\Order\Factory::createController( $context ); |
|
| 56 | - $baseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' ); |
|
| 57 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
| 55 | + $controller = \Aimeos\Controller\Common\Order\Factory::createController($context); |
|
| 56 | + $baseManager = \Aimeos\MShop\Factory::createManager($context, 'order/base'); |
|
| 57 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
| 58 | 58 | |
| 59 | 59 | /** controller/jobs/order/cleanup/unfinished/keep-hours |
| 60 | 60 | * Release the ordered products after the configured time if no payment was confirmed |
@@ -74,35 +74,35 @@ discard block |
||
| 74 | 74 | * @since 2014.07 |
| 75 | 75 | * @category User |
| 76 | 76 | */ |
| 77 | - $hours = $context->getConfig()->get( 'controller/jobs/order/cleanup/unfinished/keep-hours', 24 ); |
|
| 78 | - $limit = date( 'Y-m-d H:i:s', time() - 3600 * $hours ); |
|
| 77 | + $hours = $context->getConfig()->get('controller/jobs/order/cleanup/unfinished/keep-hours', 24); |
|
| 78 | + $limit = date('Y-m-d H:i:s', time() - 3600 * $hours); |
|
| 79 | 79 | |
| 80 | 80 | $search = $manager->createSearch(); |
| 81 | 81 | $expr = array( |
| 82 | - $search->compare( '<', 'order.mtime', $limit ), |
|
| 83 | - $search->compare( '==', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED ), |
|
| 82 | + $search->compare('<', 'order.mtime', $limit), |
|
| 83 | + $search->compare('==', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED), |
|
| 84 | 84 | ); |
| 85 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 85 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 86 | 86 | |
| 87 | 87 | $start = 0; |
| 88 | 88 | |
| 89 | 89 | do |
| 90 | 90 | { |
| 91 | 91 | $baseIds = array(); |
| 92 | - $items = $manager->searchItems( $search ); |
|
| 92 | + $items = $manager->searchItems($search); |
|
| 93 | 93 | |
| 94 | - foreach( $items as $item ) |
|
| 94 | + foreach ($items as $item) |
|
| 95 | 95 | { |
| 96 | - $controller->unblock( $item ); |
|
| 96 | + $controller->unblock($item); |
|
| 97 | 97 | $baseIds[] = $item->getBaseId(); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $baseManager->deleteItems( $baseIds ); |
|
| 100 | + $baseManager->deleteItems($baseIds); |
|
| 101 | 101 | |
| 102 | - $count = count( $items ); |
|
| 102 | + $count = count($items); |
|
| 103 | 103 | $start += $count; |
| 104 | - $search->setSlice( $start ); |
|
| 104 | + $search->setSlice($start); |
|
| 105 | 105 | } |
| 106 | - while( $count >= $search->getSliceSize() ); |
|
| 106 | + while ($count >= $search->getSliceSize()); |
|
| 107 | 107 | } |
| 108 | 108 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string|null $name Name of the controller or "Standard" if null |
| 31 | 31 | * @return \Aimeos\Controller\Jobs\Iface New controller object |
| 32 | 32 | */ |
| 33 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
| 33 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
| 34 | 34 | { |
| 35 | 35 | /** controller/jobs/order/service/async/name |
| 36 | 36 | * Class name of the used order service async scheduler controller implementation |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | * @since 2014.07 |
| 66 | 66 | * @category Developer |
| 67 | 67 | */ |
| 68 | - if( $name === null ) { |
|
| 69 | - $name = $context->getConfig()->get( 'controller/jobs/order/service/async/name', 'Standard' ); |
|
| 68 | + if ($name === null) { |
|
| 69 | + $name = $context->getConfig()->get('controller/jobs/order/service/async/name', 'Standard'); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if( ctype_alnum( $name ) === false ) |
|
| 72 | + if (ctype_alnum($name) === false) |
|
| 73 | 73 | { |
| 74 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Order\\Service\\Async\\' . $name : '<not a string>'; |
|
| 75 | - throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 74 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Order\\Service\\Async\\' . $name : '<not a string>'; |
|
| 75 | + throw new \Aimeos\Controller\Jobs\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $iface = '\\Aimeos\\Controller\\Jobs\\Iface'; |
| 79 | 79 | $classname = '\\Aimeos\\Controller\\Jobs\\Order\\Service\\Async\\' . $name; |
| 80 | 80 | |
| 81 | - $controller = self::createControllerBase( $context, $aimeos, $classname, $iface ); |
|
| 81 | + $controller = self::createControllerBase($context, $aimeos, $classname, $iface); |
|
| 82 | 82 | |
| 83 | 83 | /** controller/jobs/order/service/async/decorators/excludes |
| 84 | 84 | * Excludes decorators added by the "common" option from the order service async controllers |
@@ -154,6 +154,6 @@ discard block |
||
| 154 | 154 | * @see controller/jobs/order/service/async/decorators/excludes |
| 155 | 155 | * @see controller/jobs/order/service/async/decorators/global |
| 156 | 156 | */ |
| 157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'order/service/async' ); |
|
| 157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'order/service/async'); |
|
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getName() |
| 31 | 31 | { |
| 32 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Batch update of payment/delivery status' ); |
|
| 32 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Batch update of payment/delivery status'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function getDescription() |
| 42 | 42 | { |
| 43 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Executes payment or delivery service providers that uses batch updates' ); |
|
| 43 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Executes payment or delivery service providers that uses batch updates'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -52,32 +52,32 @@ discard block |
||
| 52 | 52 | public function run() |
| 53 | 53 | { |
| 54 | 54 | $context = $this->getContext(); |
| 55 | - $serviceManager = \Aimeos\MShop\Factory::createManager( $context, 'service' ); |
|
| 55 | + $serviceManager = \Aimeos\MShop\Factory::createManager($context, 'service'); |
|
| 56 | 56 | |
| 57 | 57 | $search = $serviceManager->createSearch(); |
| 58 | 58 | $start = 0; |
| 59 | 59 | |
| 60 | 60 | do |
| 61 | 61 | { |
| 62 | - $serviceItems = $serviceManager->searchItems( $search ); |
|
| 62 | + $serviceItems = $serviceManager->searchItems($search); |
|
| 63 | 63 | |
| 64 | - foreach( $serviceItems as $serviceItem ) |
|
| 64 | + foreach ($serviceItems as $serviceItem) |
|
| 65 | 65 | { |
| 66 | 66 | try |
| 67 | 67 | { |
| 68 | - $serviceManager->getProvider( $serviceItem )->updateAsync(); |
|
| 68 | + $serviceManager->getProvider($serviceItem)->updateAsync(); |
|
| 69 | 69 | } |
| 70 | - catch( \Exception $e ) |
|
| 70 | + catch (\Exception $e) |
|
| 71 | 71 | { |
| 72 | 72 | $msg = 'Executing updateAsyc() of "%1$s" failed: %2$s'; |
| 73 | - $context->getLogger()->log( sprintf( $msg, $serviceItem->getProvider(), $e->getMessage() ) ); |
|
| 73 | + $context->getLogger()->log(sprintf($msg, $serviceItem->getProvider(), $e->getMessage())); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - $count = count( $serviceItems ); |
|
| 77 | + $count = count($serviceItems); |
|
| 78 | 78 | $start += $count; |
| 79 | - $search->setSlice( $start ); |
|
| 79 | + $search->setSlice($start); |
|
| 80 | 80 | } |
| 81 | - while( $count >= $search->getSliceSize() ); |
|
| 81 | + while ($count >= $search->getSliceSize()); |
|
| 82 | 82 | } |
| 83 | 83 | } |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | try |
| 67 | 67 | { |
| 68 | 68 | $serviceManager->getProvider( $serviceItem )->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() ) ); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string|null $name Name of the controller or "Standard" if null |
| 31 | 31 | * @return \Aimeos\Controller\Jobs\Iface New controller object |
| 32 | 32 | */ |
| 33 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null ) |
|
| 33 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\Bootstrap $aimeos, $name = null) |
|
| 34 | 34 | { |
| 35 | 35 | /** controller/jobs/order/service/payment/name |
| 36 | 36 | * Class name of the used order service payment scheduler controller implementation |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | * @since 2014.07 |
| 66 | 66 | * @category Developer |
| 67 | 67 | */ |
| 68 | - if( $name === null ) { |
|
| 69 | - $name = $context->getConfig()->get( 'controller/jobs/order/service/payment/name', 'Standard' ); |
|
| 68 | + if ($name === null) { |
|
| 69 | + $name = $context->getConfig()->get('controller/jobs/order/service/payment/name', 'Standard'); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if( ctype_alnum( $name ) === false ) |
|
| 72 | + if (ctype_alnum($name) === false) |
|
| 73 | 73 | { |
| 74 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Order\\Service\\Payment\\' . $name : '<not a string>'; |
|
| 75 | - throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 74 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Order\\Service\\Payment\\' . $name : '<not a string>'; |
|
| 75 | + throw new \Aimeos\Controller\Jobs\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $iface = '\\Aimeos\\Controller\\Jobs\\Iface'; |
| 79 | 79 | $classname = '\\Aimeos\\Controller\\Jobs\\Order\\Service\\Payment\\' . $name; |
| 80 | 80 | |
| 81 | - $controller = self::createControllerBase( $context, $aimeos, $classname, $iface ); |
|
| 81 | + $controller = self::createControllerBase($context, $aimeos, $classname, $iface); |
|
| 82 | 82 | |
| 83 | 83 | /** controller/jobs/order/service/payment/decorators/excludes |
| 84 | 84 | * Excludes decorators added by the "common" option from the order service payment controllers |
@@ -154,6 +154,6 @@ discard block |
||
| 154 | 154 | * @see controller/jobs/order/service/payment/decorators/excludes |
| 155 | 155 | * @see controller/jobs/order/service/payment/decorators/global |
| 156 | 156 | */ |
| 157 | - return self::addControllerDecorators( $context, $aimeos, $controller, 'order/service/payment' ); |
|
| 157 | + return self::addControllerDecorators($context, $aimeos, $controller, 'order/service/payment'); |
|
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getName() |
| 31 | 31 | { |
| 32 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Capture authorized payments' ); |
|
| 32 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Capture authorized payments'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function getDescription() |
| 42 | 42 | { |
| 43 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Authorized payments of orders will be captured after dispatching or after a configurable amount of time' ); |
|
| 43 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Authorized payments of orders will be captured after dispatching or after a configurable amount of time'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | * @category User |
| 69 | 69 | * @category Developer |
| 70 | 70 | */ |
| 71 | - $days = $config->get( 'controller/jobs/order/service/payment/limit-days', 90 ); |
|
| 72 | - $date = date( 'Y-m-d 00:00:00', time() - 86400 * $days ); |
|
| 71 | + $days = $config->get('controller/jobs/order/service/payment/limit-days', 90); |
|
| 72 | + $date = date('Y-m-d 00:00:00', time() - 86400 * $days); |
|
| 73 | 73 | |
| 74 | 74 | /** controller/jobs/order/service/payment/capture-days |
| 75 | 75 | * Automatically capture payments after the configured amount of days |
@@ -84,91 +84,91 @@ discard block |
||
| 84 | 84 | * @category User |
| 85 | 85 | * @category Developer |
| 86 | 86 | */ |
| 87 | - $capDays = $config->get( 'controller/jobs/order/service/payment/capture-days', null ); |
|
| 87 | + $capDays = $config->get('controller/jobs/order/service/payment/capture-days', null); |
|
| 88 | 88 | |
| 89 | 89 | |
| 90 | - $serviceManager = \Aimeos\MShop\Factory::createManager( $context, 'service' ); |
|
| 90 | + $serviceManager = \Aimeos\MShop\Factory::createManager($context, 'service'); |
|
| 91 | 91 | $serviceSearch = $serviceManager->createSearch(); |
| 92 | - $serviceSearch->setConditions( $serviceSearch->compare( '==', 'service.type.code', 'payment' ) ); |
|
| 92 | + $serviceSearch->setConditions($serviceSearch->compare('==', 'service.type.code', 'payment')); |
|
| 93 | 93 | |
| 94 | - $orderManager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
| 94 | + $orderManager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
| 95 | 95 | $orderSearch = $orderManager->createSearch(); |
| 96 | 96 | |
| 97 | - $status = array( \Aimeos\MShop\Order\Item\Base::STAT_DISPATCHED, \Aimeos\MShop\Order\Item\Base::STAT_DELIVERED ); |
|
| 97 | + $status = array(\Aimeos\MShop\Order\Item\Base::STAT_DISPATCHED, \Aimeos\MShop\Order\Item\Base::STAT_DELIVERED); |
|
| 98 | 98 | $start = 0; |
| 99 | 99 | |
| 100 | 100 | do |
| 101 | 101 | { |
| 102 | - $serviceItems = $serviceManager->searchItems( $serviceSearch ); |
|
| 102 | + $serviceItems = $serviceManager->searchItems($serviceSearch); |
|
| 103 | 103 | |
| 104 | - foreach( $serviceItems as $serviceItem ) |
|
| 104 | + foreach ($serviceItems as $serviceItem) |
|
| 105 | 105 | { |
| 106 | 106 | try |
| 107 | 107 | { |
| 108 | - $serviceProvider = $serviceManager->getProvider( $serviceItem ); |
|
| 108 | + $serviceProvider = $serviceManager->getProvider($serviceItem); |
|
| 109 | 109 | |
| 110 | - if( !$serviceProvider->isImplemented( \Aimeos\MShop\Service\Provider\Payment\Base::FEAT_CAPTURE ) ) { |
|
| 110 | + if (!$serviceProvider->isImplemented(\Aimeos\MShop\Service\Provider\Payment\Base::FEAT_CAPTURE)) { |
|
| 111 | 111 | continue; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | |
| 115 | 115 | $expr = array(); |
| 116 | - $expr[] = $orderSearch->compare( '==', 'order.siteid', $serviceItem->getSiteId() ); |
|
| 117 | - $expr[] = $orderSearch->compare( '>', 'order.datepayment', $date ); |
|
| 116 | + $expr[] = $orderSearch->compare('==', 'order.siteid', $serviceItem->getSiteId()); |
|
| 117 | + $expr[] = $orderSearch->compare('>', 'order.datepayment', $date); |
|
| 118 | 118 | |
| 119 | - if( $capDays !== null ) |
|
| 119 | + if ($capDays !== null) |
|
| 120 | 120 | { |
| 121 | - $capdate = date( 'Y-m-d 00:00:00', time() - 86400 * $capDays ); |
|
| 122 | - $expr[] = $orderSearch->compare( '<=', 'order.datepayment', $capdate ); |
|
| 121 | + $capdate = date('Y-m-d 00:00:00', time() - 86400 * $capDays); |
|
| 122 | + $expr[] = $orderSearch->compare('<=', 'order.datepayment', $capdate); |
|
| 123 | 123 | } |
| 124 | 124 | else |
| 125 | 125 | { |
| 126 | - $expr[] = $orderSearch->compare( '==', 'order.statusdelivery', $status ); |
|
| 126 | + $expr[] = $orderSearch->compare('==', 'order.statusdelivery', $status); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - $expr[] = $orderSearch->compare( '==', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ); |
|
| 130 | - $expr[] = $orderSearch->compare( '==', 'order.base.service.code', $serviceItem->getCode() ); |
|
| 131 | - $expr[] = $orderSearch->compare( '==', 'order.base.service.type', 'payment' ); |
|
| 129 | + $expr[] = $orderSearch->compare('==', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED); |
|
| 130 | + $expr[] = $orderSearch->compare('==', 'order.base.service.code', $serviceItem->getCode()); |
|
| 131 | + $expr[] = $orderSearch->compare('==', 'order.base.service.type', 'payment'); |
|
| 132 | 132 | |
| 133 | - $orderSearch->setConditions( $orderSearch->combine( '&&', $expr ) ); |
|
| 133 | + $orderSearch->setConditions($orderSearch->combine('&&', $expr)); |
|
| 134 | 134 | |
| 135 | 135 | |
| 136 | 136 | $orderStart = 0; |
| 137 | 137 | |
| 138 | 138 | do |
| 139 | 139 | { |
| 140 | - $orderItems = $orderManager->searchItems( $orderSearch ); |
|
| 140 | + $orderItems = $orderManager->searchItems($orderSearch); |
|
| 141 | 141 | |
| 142 | - foreach( $orderItems as $orderItem ) |
|
| 142 | + foreach ($orderItems as $orderItem) |
|
| 143 | 143 | { |
| 144 | 144 | try |
| 145 | 145 | { |
| 146 | - $serviceProvider->capture( $orderItem ); |
|
| 146 | + $serviceProvider->capture($orderItem); |
|
| 147 | 147 | } |
| 148 | - catch( \Exception $e ) |
|
| 148 | + catch (\Exception $e) |
|
| 149 | 149 | { |
| 150 | 150 | $str = 'Error while capturing payment for order with ID "%1$s": %2$s'; |
| 151 | - $context->getLogger()->log( sprintf( $str, $orderItem->getId(), $e->getMessage() ) ); |
|
| 151 | + $context->getLogger()->log(sprintf($str, $orderItem->getId(), $e->getMessage())); |
|
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - $orderCount = count( $orderItems ); |
|
| 155 | + $orderCount = count($orderItems); |
|
| 156 | 156 | $orderStart += $orderCount; |
| 157 | - $orderSearch->setSlice( $orderStart ); |
|
| 157 | + $orderSearch->setSlice($orderStart); |
|
| 158 | 158 | } |
| 159 | - while( $orderCount >= $orderSearch->getSliceSize() ); |
|
| 159 | + while ($orderCount >= $orderSearch->getSliceSize()); |
|
| 160 | 160 | } |
| 161 | - catch( \Exception $e ) |
|
| 161 | + catch (\Exception $e) |
|
| 162 | 162 | { |
| 163 | 163 | $str = 'Error while capturing payments for service with ID "%1$s": %2$s'; |
| 164 | - $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
|
| 164 | + $context->getLogger()->log(sprintf($str, $serviceItem->getId(), $e->getMessage())); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | - $count = count( $serviceItems ); |
|
| 168 | + $count = count($serviceItems); |
|
| 169 | 169 | $start += $count; |
| 170 | - $serviceSearch->setSlice( $start ); |
|
| 170 | + $serviceSearch->setSlice($start); |
|
| 171 | 171 | } |
| 172 | - while( $count >= $serviceSearch->getSliceSize() ); |
|
| 172 | + while ($count >= $serviceSearch->getSliceSize()); |
|
| 173 | 173 | } |
| 174 | 174 | } |
@@ -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() ) ); |