@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getName() |
30 | 30 | { |
31 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Subscription process start' ); |
|
31 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Subscription process start'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getDescription() |
41 | 41 | { |
42 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Process subscriptions initially' ); |
|
42 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Process subscriptions initially'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @see controller/common/subscription/process/payment-status |
68 | 68 | * @see controller/common/subscription/process/payment-days |
69 | 69 | */ |
70 | - $names = (array) $config->get( 'controller/common/subscription/process/processors', [] ); |
|
70 | + $names = (array) $config->get('controller/common/subscription/process/processors', []); |
|
71 | 71 | |
72 | 72 | /** controller/common/subscription/process/payment-status |
73 | 73 | * Minimum payment status that will activate the subscription |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @see controller/common/subscription/process/payment-days |
87 | 87 | */ |
88 | 88 | $status = \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED; |
89 | - $status = $config->get( 'controller/common/subscription/process/payment-status', $status ); |
|
89 | + $status = $config->get('controller/common/subscription/process/payment-status', $status); |
|
90 | 90 | |
91 | 91 | /** controller/common/subscription/process/payment-days |
92 | 92 | * Number of days to wait for the payment until subscription is removed |
@@ -104,74 +104,74 @@ discard block |
||
104 | 104 | * @see controller/common/subscription/process/processors |
105 | 105 | * @see controller/common/subscription/process/payment-status |
106 | 106 | */ |
107 | - $days = (float) $config->get( 'controller/common/subscription/process/payment-days', 3 ); |
|
107 | + $days = (float) $config->get('controller/common/subscription/process/payment-days', 3); |
|
108 | 108 | |
109 | 109 | |
110 | - $processors = $this->getProcessors( $names ); |
|
111 | - $orderManager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
112 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' ); |
|
110 | + $processors = $this->getProcessors($names); |
|
111 | + $orderManager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'subscription'); |
|
113 | 113 | |
114 | - $search = $manager->createSearch( true ); |
|
114 | + $search = $manager->createSearch(true); |
|
115 | 115 | $expr = [ |
116 | - $search->compare( '==', 'subscription.datenext', null ), |
|
116 | + $search->compare('==', 'subscription.datenext', null), |
|
117 | 117 | $search->getConditions(), |
118 | 118 | ]; |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
120 | - $search->setSortations( [$search->sort( '+', 'subscription.id' )] ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | + $search->setSortations([$search->sort('+', 'subscription.id')]); |
|
121 | 121 | |
122 | - $date = date( 'Y-m-d H:i:s', time() - 86400 * $days ); |
|
122 | + $date = date('Y-m-d H:i:s', time() - 86400 * $days); |
|
123 | 123 | $start = 0; |
124 | 124 | |
125 | 125 | do |
126 | 126 | { |
127 | 127 | $ordBaseIds = $payStatus = []; |
128 | 128 | |
129 | - $search->setSlice( $start, 100 ); |
|
130 | - $items = $manager->searchItems( $search ); |
|
129 | + $search->setSlice($start, 100); |
|
130 | + $items = $manager->searchItems($search); |
|
131 | 131 | |
132 | - foreach( $items as $item ) { |
|
132 | + foreach ($items as $item) { |
|
133 | 133 | $ordBaseIds[] = $item->getOrderBaseId(); |
134 | 134 | } |
135 | 135 | |
136 | - $orderSearch = $orderManager->createSearch()->setSlice( 0, $search->getSliceSize() ); |
|
137 | - $orderSearch->setConditions( $orderSearch->compare( '==', 'order.base.id', $ordBaseIds ) ); |
|
138 | - $orderSearch->setSortations( [$orderSearch->sort( '+', 'order.id' )] ); |
|
136 | + $orderSearch = $orderManager->createSearch()->setSlice(0, $search->getSliceSize()); |
|
137 | + $orderSearch->setConditions($orderSearch->compare('==', 'order.base.id', $ordBaseIds)); |
|
138 | + $orderSearch->setSortations([$orderSearch->sort('+', 'order.id')]); |
|
139 | 139 | |
140 | - foreach( $orderManager->searchItems( $orderSearch ) as $orderItem ) { |
|
140 | + foreach ($orderManager->searchItems($orderSearch) as $orderItem) { |
|
141 | 141 | $payStatus[$orderItem->getBaseId()] = $orderItem->getPaymentStatus(); |
142 | 142 | } |
143 | 143 | |
144 | - foreach( $items as $item ) |
|
144 | + foreach ($items as $item) |
|
145 | 145 | { |
146 | 146 | try |
147 | 147 | { |
148 | - if( isset( $payStatus[$item->getOrderBaseId()] ) && $payStatus[$item->getOrderBaseId()] >= $status ) |
|
148 | + if (isset($payStatus[$item->getOrderBaseId()]) && $payStatus[$item->getOrderBaseId()] >= $status) |
|
149 | 149 | { |
150 | - foreach( $processors as $processor ) { |
|
151 | - $processor->begin( $item ); |
|
150 | + foreach ($processors as $processor) { |
|
151 | + $processor->begin($item); |
|
152 | 152 | } |
153 | 153 | |
154 | - $interval = new \DateInterval( $item->getInterval() ); |
|
155 | - $item->setDateNext( date_create( $item->getTimeCreated() )->add( $interval )->format( 'Y-m-d' ) ); |
|
154 | + $interval = new \DateInterval($item->getInterval()); |
|
155 | + $item->setDateNext(date_create($item->getTimeCreated())->add($interval)->format('Y-m-d')); |
|
156 | 156 | } |
157 | - elseif( $item->getTimeCreated() < $date ) |
|
157 | + elseif ($item->getTimeCreated() < $date) |
|
158 | 158 | { |
159 | - $item->setStatus( 0 ); |
|
159 | + $item->setStatus(0); |
|
160 | 160 | } |
161 | 161 | |
162 | - $manager->saveItem( $item ); |
|
162 | + $manager->saveItem($item); |
|
163 | 163 | } |
164 | - catch( \Exception $e ) |
|
164 | + catch (\Exception $e) |
|
165 | 165 | { |
166 | 166 | $msg = 'Unable to process subscription with ID "%1$S": %2$s'; |
167 | - $logger->log( sprintf( $msg, $item->getId(), $e->getMessage() ) ); |
|
168 | - $logger->log( $e->getTraceAsString() ); |
|
167 | + $logger->log(sprintf($msg, $item->getId(), $e->getMessage())); |
|
168 | + $logger->log($e->getTraceAsString()); |
|
169 | 169 | } |
170 | 170 | } |
171 | 171 | |
172 | - $count = count( $items ); |
|
172 | + $count = count($items); |
|
173 | 173 | $start += $count; |
174 | 174 | } |
175 | - while( $count === $search->getSliceSize() ); |
|
175 | + while ($count === $search->getSliceSize()); |
|
176 | 176 | } |
177 | 177 | } |
@@ -153,15 +153,13 @@ |
||
153 | 153 | |
154 | 154 | $interval = new \DateInterval( $item->getInterval() ); |
155 | 155 | $item->setDateNext( date_create( $item->getTimeCreated() )->add( $interval )->format( 'Y-m-d' ) ); |
156 | - } |
|
157 | - elseif( $item->getTimeCreated() < $date ) |
|
156 | + } elseif( $item->getTimeCreated() < $date ) |
|
158 | 157 | { |
159 | 158 | $item->setStatus( 0 ); |
160 | 159 | } |
161 | 160 | |
162 | 161 | $manager->saveItem( $item ); |
163 | - } |
|
164 | - catch( \Exception $e ) |
|
162 | + } catch( \Exception $e ) |
|
165 | 163 | { |
166 | 164 | $msg = 'Unable to process subscription with ID "%1$S": %2$s'; |
167 | 165 | $logger->log( sprintf( $msg, $item->getId(), $e->getMessage() ) ); |
@@ -15,14 +15,14 @@ discard block |
||
15 | 15 | public static function bootstrap() |
16 | 16 | { |
17 | 17 | self::getAimeos(); |
18 | - \Aimeos\MShop\Factory::setCache( false ); |
|
18 | + \Aimeos\MShop\Factory::setCache(false); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | |
22 | - public static function getContext( $site = 'unittest' ) |
|
22 | + public static function getContext($site = 'unittest') |
|
23 | 23 | { |
24 | - if( !isset( self::$context[$site] ) ) { |
|
25 | - self::$context[$site] = self::createContext( $site ); |
|
24 | + if (!isset(self::$context[$site])) { |
|
25 | + self::$context[$site] = self::createContext($site); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | return clone self::$context[$site]; |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | |
32 | 32 | public static function getAimeos() |
33 | 33 | { |
34 | - if( !isset( self::$aimeos ) ) |
|
34 | + if (!isset(self::$aimeos)) |
|
35 | 35 | { |
36 | 36 | require_once 'Bootstrap.php'; |
37 | - spl_autoload_register( 'Aimeos\\Bootstrap::autoload' ); |
|
37 | + spl_autoload_register('Aimeos\\Bootstrap::autoload'); |
|
38 | 38 | |
39 | - $extdir = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ); |
|
40 | - self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), true ); |
|
39 | + $extdir = dirname(dirname(dirname(dirname(dirname(__FILE__))))); |
|
40 | + self::$aimeos = new \Aimeos\Bootstrap(array($extdir), true); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | return self::$aimeos; |
@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | |
47 | 47 | public static function getControllerPaths() |
48 | 48 | { |
49 | - return self::getAimeos()->getCustomPaths( 'controller/jobs' ); |
|
49 | + return self::getAimeos()->getCustomPaths('controller/jobs'); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | |
53 | 53 | /** |
54 | 54 | * @param string $site |
55 | 55 | */ |
56 | - private static function createContext( $site ) |
|
56 | + private static function createContext($site) |
|
57 | 57 | { |
58 | 58 | $ctx = new \Aimeos\MShop\Context\Item\Standard(); |
59 | 59 | $aimeos = self::getAimeos(); |
@@ -63,80 +63,80 @@ discard block |
||
63 | 63 | $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; |
64 | 64 | $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; |
65 | 65 | |
66 | - $conf = new \Aimeos\MW\Config\PHPArray( [], $paths ); |
|
67 | - $conf = new \Aimeos\MW\Config\Decorator\Memory( $conf ); |
|
68 | - $conf = new \Aimeos\MW\Config\Decorator\Documentor( $conf, $file ); |
|
69 | - $ctx->setConfig( $conf ); |
|
66 | + $conf = new \Aimeos\MW\Config\PHPArray([], $paths); |
|
67 | + $conf = new \Aimeos\MW\Config\Decorator\Memory($conf); |
|
68 | + $conf = new \Aimeos\MW\Config\Decorator\Documentor($conf, $file); |
|
69 | + $ctx->setConfig($conf); |
|
70 | 70 | |
71 | 71 | |
72 | - $logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
73 | - $ctx->setLogger( $logger ); |
|
72 | + $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG); |
|
73 | + $ctx->setLogger($logger); |
|
74 | 74 | |
75 | 75 | |
76 | - $dbm = new \Aimeos\MW\DB\Manager\PDO( $conf ); |
|
77 | - $ctx->setDatabaseManager( $dbm ); |
|
76 | + $dbm = new \Aimeos\MW\DB\Manager\PDO($conf); |
|
77 | + $ctx->setDatabaseManager($dbm); |
|
78 | 78 | |
79 | 79 | |
80 | - $fs = new \Aimeos\MW\Filesystem\Manager\Standard( $conf ); |
|
81 | - $ctx->setFilesystemManager( $fs ); |
|
80 | + $fs = new \Aimeos\MW\Filesystem\Manager\Standard($conf); |
|
81 | + $ctx->setFilesystemManager($fs); |
|
82 | 82 | |
83 | 83 | |
84 | - $mq = new \Aimeos\MW\MQueue\Manager\Standard( $conf ); |
|
85 | - $ctx->setMessageQueueManager( $mq ); |
|
84 | + $mq = new \Aimeos\MW\MQueue\Manager\Standard($conf); |
|
85 | + $ctx->setMessageQueueManager($mq); |
|
86 | 86 | |
87 | 87 | |
88 | 88 | $cache = new \Aimeos\MW\Cache\None(); |
89 | - $ctx->setCache( $cache ); |
|
89 | + $ctx->setCache($cache); |
|
90 | 90 | |
91 | 91 | |
92 | 92 | $session = new \Aimeos\MW\Session\None(); |
93 | - $ctx->setSession( $session ); |
|
93 | + $ctx->setSession($session); |
|
94 | 94 | |
95 | 95 | |
96 | - $i18n = new \Aimeos\MW\Translation\None( 'de' ); |
|
97 | - $ctx->setI18n( array( 'de' => $i18n ) ); |
|
96 | + $i18n = new \Aimeos\MW\Translation\None('de'); |
|
97 | + $ctx->setI18n(array('de' => $i18n)); |
|
98 | 98 | |
99 | 99 | |
100 | - $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $ctx ); |
|
101 | - $locale = $localeManager->bootstrap( $site, 'de', '', false ); |
|
102 | - $ctx->setLocale( $locale ); |
|
100 | + $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx); |
|
101 | + $locale = $localeManager->bootstrap($site, 'de', '', false); |
|
102 | + $ctx->setLocale($locale); |
|
103 | 103 | |
104 | 104 | |
105 | - $view = self::createView( $conf ); |
|
106 | - $ctx->setView( $view ); |
|
105 | + $view = self::createView($conf); |
|
106 | + $ctx->setView($view); |
|
107 | 107 | |
108 | 108 | |
109 | - $ctx->setEditor( 'core:controller/jobs' ); |
|
109 | + $ctx->setEditor('core:controller/jobs'); |
|
110 | 110 | |
111 | 111 | return $ctx; |
112 | 112 | } |
113 | 113 | |
114 | 114 | |
115 | - protected static function createView( \Aimeos\MW\Config\Iface $config ) |
|
115 | + protected static function createView(\Aimeos\MW\Config\Iface $config) |
|
116 | 116 | { |
117 | 117 | $tmplpaths = array_merge_recursive( |
118 | - self::getAimeos()->getCustomPaths( 'client/html/templates' ), |
|
119 | - self::getAimeos()->getCustomPaths( 'controller/jobs/templates' ) |
|
118 | + self::getAimeos()->getCustomPaths('client/html/templates'), |
|
119 | + self::getAimeos()->getCustomPaths('controller/jobs/templates') |
|
120 | 120 | ); |
121 | 121 | |
122 | - $view = new \Aimeos\MW\View\Standard( $tmplpaths ); |
|
122 | + $view = new \Aimeos\MW\View\Standard($tmplpaths); |
|
123 | 123 | |
124 | - $trans = new \Aimeos\MW\Translation\None( 'de_DE' ); |
|
125 | - $helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $trans ); |
|
126 | - $view->addHelper( 'translate', $helper ); |
|
124 | + $trans = new \Aimeos\MW\Translation\None('de_DE'); |
|
125 | + $helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $trans); |
|
126 | + $view->addHelper('translate', $helper); |
|
127 | 127 | |
128 | - $helper = new \Aimeos\MW\View\Helper\Url\Standard( $view, 'http://baseurl' ); |
|
129 | - $view->addHelper( 'url', $helper ); |
|
128 | + $helper = new \Aimeos\MW\View\Helper\Url\Standard($view, 'http://baseurl'); |
|
129 | + $view->addHelper('url', $helper); |
|
130 | 130 | |
131 | - $helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, '.', '' ); |
|
132 | - $view->addHelper( 'number', $helper ); |
|
131 | + $helper = new \Aimeos\MW\View\Helper\Number\Standard($view, '.', ''); |
|
132 | + $view->addHelper('number', $helper); |
|
133 | 133 | |
134 | - $helper = new \Aimeos\MW\View\Helper\Date\Standard( $view, 'Y-m-d' ); |
|
135 | - $view->addHelper( 'date', $helper ); |
|
134 | + $helper = new \Aimeos\MW\View\Helper\Date\Standard($view, 'Y-m-d'); |
|
135 | + $view->addHelper('date', $helper); |
|
136 | 136 | |
137 | - $config = new \Aimeos\MW\Config\Decorator\Protect( $config, array( 'controller/jobs', 'client/html' ) ); |
|
138 | - $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config ); |
|
139 | - $view->addHelper( 'config', $helper ); |
|
137 | + $config = new \Aimeos\MW\Config\Decorator\Protect($config, array('controller/jobs', 'client/html')); |
|
138 | + $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config); |
|
139 | + $view->addHelper('config', $helper); |
|
140 | 140 | |
141 | 141 | return $view; |
142 | 142 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function getName() |
31 | 31 | { |
32 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Process order delivery services' ); |
|
32 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Process order delivery services'); |
|
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 paid orders to the ERP system or logistic partner' ); |
|
43 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Sends paid orders to the ERP system or logistic partner'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | * @see controller/jobs/order/email/delivery/standard/limit-days |
70 | 70 | * @see controller/jobs/order/service/delivery/batch-max |
71 | 71 | */ |
72 | - $days = $context->getConfig()->get( 'controller/jobs/order/service/delivery/limit-days', 90 ); |
|
73 | - $date = date( 'Y-m-d 00:00:00', time() - 86400 * $days ); |
|
72 | + $days = $context->getConfig()->get('controller/jobs/order/service/delivery/limit-days', 90); |
|
73 | + $date = date('Y-m-d 00:00:00', time() - 86400 * $days); |
|
74 | 74 | |
75 | 75 | /** controller/jobs/order/service/delivery/batch-max |
76 | 76 | * Maximum number of orders processed at once by the delivery service provider |
@@ -85,71 +85,71 @@ discard block |
||
85 | 85 | * @category Developer |
86 | 86 | * @see controller/jobs/order/service/delivery/limit-days |
87 | 87 | */ |
88 | - $maxItems = $context->getConfig()->get( 'controller/jobs/order/service/delivery/batch-max', 100 ); |
|
88 | + $maxItems = $context->getConfig()->get('controller/jobs/order/service/delivery/batch-max', 100); |
|
89 | 89 | |
90 | 90 | |
91 | - $serviceManager = \Aimeos\MShop\Service\Manager\Factory::createManager( $context ); |
|
91 | + $serviceManager = \Aimeos\MShop\Service\Manager\Factory::createManager($context); |
|
92 | 92 | $serviceSearch = $serviceManager->createSearch(); |
93 | - $serviceSearch->setConditions( $serviceSearch->compare( '==', 'service.type.code', 'delivery' ) ); |
|
93 | + $serviceSearch->setConditions($serviceSearch->compare('==', 'service.type.code', 'delivery')); |
|
94 | 94 | |
95 | - $orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( $context ); |
|
95 | + $orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager($context); |
|
96 | 96 | $orderSearch = $orderManager->createSearch(); |
97 | 97 | |
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, $serviceItem->getType() ); |
|
108 | + $serviceProvider = $serviceManager->getProvider($serviceItem, $serviceItem->getType()); |
|
109 | 109 | |
110 | 110 | $expr = array( |
111 | - $orderSearch->compare( '>', 'order.datepayment', $date ), |
|
112 | - $orderSearch->compare( '>', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_PENDING ), |
|
113 | - $orderSearch->compare( '==', 'order.statusdelivery', \Aimeos\MShop\Order\Item\Base::STAT_UNFINISHED ), |
|
114 | - $orderSearch->compare( '==', 'order.base.service.code', $serviceItem->getCode() ), |
|
115 | - $orderSearch->compare( '==', 'order.base.service.type', 'delivery' ), |
|
111 | + $orderSearch->compare('>', 'order.datepayment', $date), |
|
112 | + $orderSearch->compare('>', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_PENDING), |
|
113 | + $orderSearch->compare('==', 'order.statusdelivery', \Aimeos\MShop\Order\Item\Base::STAT_UNFINISHED), |
|
114 | + $orderSearch->compare('==', 'order.base.service.code', $serviceItem->getCode()), |
|
115 | + $orderSearch->compare('==', 'order.base.service.type', 'delivery'), |
|
116 | 116 | ); |
117 | - $orderSearch->setConditions( $orderSearch->combine( '&&', $expr ) ); |
|
117 | + $orderSearch->setConditions($orderSearch->combine('&&', $expr)); |
|
118 | 118 | |
119 | 119 | $orderStart = 0; |
120 | 120 | |
121 | 121 | do |
122 | 122 | { |
123 | - $orderSearch->setSlice( $orderStart, $maxItems ); |
|
124 | - $orderItems = $orderManager->searchItems( $orderSearch ); |
|
123 | + $orderSearch->setSlice($orderStart, $maxItems); |
|
124 | + $orderItems = $orderManager->searchItems($orderSearch); |
|
125 | 125 | |
126 | 126 | try |
127 | 127 | { |
128 | - $serviceProvider->processBatch( $orderItems ); |
|
129 | - $orderManager->saveItems( $orderItems ); |
|
128 | + $serviceProvider->processBatch($orderItems); |
|
129 | + $orderManager->saveItems($orderItems); |
|
130 | 130 | } |
131 | - catch( \Exception $e ) |
|
131 | + catch (\Exception $e) |
|
132 | 132 | { |
133 | 133 | $str = 'Error while processing orders by delivery service "%1$s": %2$s'; |
134 | - $context->getLogger()->log( sprintf( $str, $serviceItem->getLabel(), $e->getMessage() ) ); |
|
134 | + $context->getLogger()->log(sprintf($str, $serviceItem->getLabel(), $e->getMessage())); |
|
135 | 135 | } |
136 | 136 | |
137 | - $orderCount = count( $orderItems ); |
|
137 | + $orderCount = count($orderItems); |
|
138 | 138 | $orderStart += $orderCount; |
139 | 139 | } |
140 | - while( $orderCount >= $orderSearch->getSliceSize() ); |
|
140 | + while ($orderCount >= $orderSearch->getSliceSize()); |
|
141 | 141 | } |
142 | - catch( \Exception $e ) |
|
142 | + catch (\Exception $e) |
|
143 | 143 | { |
144 | 144 | $str = 'Error while processing service with ID "%1$s": %2$s'; |
145 | - $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
|
145 | + $context->getLogger()->log(sprintf($str, $serviceItem->getId(), $e->getMessage())); |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
149 | - $count = count( $serviceItems ); |
|
149 | + $count = count($serviceItems); |
|
150 | 150 | $start += $count; |
151 | - $serviceSearch->setSlice( $start ); |
|
151 | + $serviceSearch->setSlice($start); |
|
152 | 152 | } |
153 | - while( $count >= $serviceSearch->getSliceSize() ); |
|
153 | + while ($count >= $serviceSearch->getSliceSize()); |
|
154 | 154 | } |
155 | 155 | } |
@@ -127,8 +127,7 @@ discard block |
||
127 | 127 | { |
128 | 128 | $serviceProvider->processBatch( $orderItems ); |
129 | 129 | $orderManager->saveItems( $orderItems ); |
130 | - } |
|
131 | - catch( \Exception $e ) |
|
130 | + } catch( \Exception $e ) |
|
132 | 131 | { |
133 | 132 | $str = 'Error while processing orders by delivery service "%1$s": %2$s'; |
134 | 133 | $context->getLogger()->log( sprintf( $str, $serviceItem->getLabel(), $e->getMessage() ) ); |
@@ -138,8 +137,7 @@ discard block |
||
138 | 137 | $orderStart += $orderCount; |
139 | 138 | } |
140 | 139 | while( $orderCount >= $orderSearch->getSliceSize() ); |
141 | - } |
|
142 | - catch( \Exception $e ) |
|
140 | + } catch( \Exception $e ) |
|
143 | 141 | { |
144 | 142 | $str = 'Error while processing service with ID "%1$s": %2$s'; |
145 | 143 | $context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) ); |
@@ -40,24 +40,24 @@ discard block |
||
40 | 40 | * @param \Aimeos\MShop\Order\Item\Base\Iface $order Full order with associated items |
41 | 41 | * @return array Two dimensional associative list of order data representing the lines in CSV |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Base\Iface $order ) |
|
43 | + public function process(\Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Base\Iface $order) |
|
44 | 44 | { |
45 | 45 | $result = []; |
46 | 46 | |
47 | - foreach( $order->getProducts() as $item ) |
|
47 | + foreach ($order->getProducts() as $item) |
|
48 | 48 | { |
49 | - if( $subscription->getOrderProductId() != $item->getId() ) { |
|
49 | + if ($subscription->getOrderProductId() != $item->getId()) { |
|
50 | 50 | continue; |
51 | 51 | } |
52 | 52 | |
53 | 53 | $data = []; |
54 | 54 | $list = $item->toArray(); |
55 | 55 | |
56 | - foreach( $item->getAttributeItems() as $attrItem ) |
|
56 | + foreach ($item->getAttributeItems() as $attrItem) |
|
57 | 57 | { |
58 | - foreach( $attrItem->toArray() as $key => $value ) |
|
58 | + foreach ($attrItem->toArray() as $key => $value) |
|
59 | 59 | { |
60 | - if( isset( $list[$key] ) ) { |
|
60 | + if (isset($list[$key])) { |
|
61 | 61 | $list[$key] .= "\n" . $value; |
62 | 62 | } else { |
63 | 63 | $list[$key] = $value; |
@@ -65,16 +65,16 @@ discard block |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | - foreach( $this->getMapping() as $pos => $key ) |
|
68 | + foreach ($this->getMapping() as $pos => $key) |
|
69 | 69 | { |
70 | - if( array_key_exists( $key, $list ) ) { |
|
70 | + if (array_key_exists($key, $list)) { |
|
71 | 71 | $data[$pos] = $list[$key]; |
72 | 72 | } else { |
73 | 73 | $data[$pos] = ''; |
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | - ksort( $data ); |
|
77 | + ksort($data); |
|
78 | 78 | $result[] = $data; |
79 | 79 | } |
80 | 80 |
@@ -40,20 +40,20 @@ discard block |
||
40 | 40 | * @param \Aimeos\MShop\Order\Item\Base\Iface $order Full order with associated items |
41 | 41 | * @return array Two dimensional associative list of order data representing the lines in CSV |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order ) |
|
43 | + public function process(\Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order) |
|
44 | 44 | { |
45 | 45 | $result = []; |
46 | 46 | |
47 | - foreach( $order->getProducts() as $item ) |
|
47 | + foreach ($order->getProducts() as $item) |
|
48 | 48 | { |
49 | 49 | $data = []; |
50 | 50 | $list = $item->toArray(); |
51 | 51 | |
52 | - foreach( $item->getAttributeItems() as $attrItem ) |
|
52 | + foreach ($item->getAttributeItems() as $attrItem) |
|
53 | 53 | { |
54 | - foreach( $attrItem->toArray() as $key => $value ) |
|
54 | + foreach ($attrItem->toArray() as $key => $value) |
|
55 | 55 | { |
56 | - if( isset( $list[$key] ) ) { |
|
56 | + if (isset($list[$key])) { |
|
57 | 57 | $list[$key] .= "\n" . $value; |
58 | 58 | } else { |
59 | 59 | $list[$key] = $value; |
@@ -61,16 +61,16 @@ discard block |
||
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
64 | - foreach( $this->getMapping() as $pos => $key ) |
|
64 | + foreach ($this->getMapping() as $pos => $key) |
|
65 | 65 | { |
66 | - if( array_key_exists( $key, $list ) ) { |
|
66 | + if (array_key_exists($key, $list)) { |
|
67 | 67 | $data[$pos] = $list[$key]; |
68 | 68 | } else { |
69 | 69 | $data[$pos] = ''; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | - ksort( $data ); |
|
73 | + ksort($data); |
|
74 | 74 | $result[] = $data; |
75 | 75 | } |
76 | 76 |
@@ -40,25 +40,25 @@ discard block |
||
40 | 40 | * @param \Aimeos\MShop\Order\Item\Base\Iface $order Full order with associated items |
41 | 41 | * @return array Two dimensional associative list of order data representing the lines in CSV |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order ) |
|
43 | + public function process(\Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order) |
|
44 | 44 | { |
45 | 45 | $result = []; |
46 | 46 | $services = $order->getServices(); |
47 | 47 | |
48 | - krsort( $services ); |
|
48 | + krsort($services); |
|
49 | 49 | |
50 | - foreach( $services as $list ) |
|
50 | + foreach ($services as $list) |
|
51 | 51 | { |
52 | - foreach( $list as $item ) |
|
52 | + foreach ($list as $item) |
|
53 | 53 | { |
54 | 54 | $data = []; |
55 | 55 | $list = $item->toArray(); |
56 | 56 | |
57 | - foreach( $item->getAttributeItems() as $attrItem ) |
|
57 | + foreach ($item->getAttributeItems() as $attrItem) |
|
58 | 58 | { |
59 | - foreach( $attrItem->toArray() as $key => $value ) |
|
59 | + foreach ($attrItem->toArray() as $key => $value) |
|
60 | 60 | { |
61 | - if( isset( $list[$key] ) ) { |
|
61 | + if (isset($list[$key])) { |
|
62 | 62 | $list[$key] .= "\n" . $value; |
63 | 63 | } else { |
64 | 64 | $list[$key] = $value; |
@@ -66,16 +66,16 @@ discard block |
||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - foreach( $this->getMapping() as $pos => $key ) |
|
69 | + foreach ($this->getMapping() as $pos => $key) |
|
70 | 70 | { |
71 | - if( array_key_exists( $key, $list ) ) { |
|
71 | + if (array_key_exists($key, $list)) { |
|
72 | 72 | $data[$pos] = $list[$key]; |
73 | 73 | } else { |
74 | 74 | $data[$pos] = ''; |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | - ksort( $data ); |
|
78 | + ksort($data); |
|
79 | 79 | $result[] = $data; |
80 | 80 | } |
81 | 81 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getName() |
30 | 30 | { |
31 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Product site map' ); |
|
31 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Product site map'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getDescription() |
41 | 41 | { |
42 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Creates a product site map for search engines' ); |
|
42 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Creates a product site map for search engines'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | { |
53 | 53 | $container = $this->createContainer(); |
54 | 54 | |
55 | - $files = $this->export( $container ); |
|
56 | - $this->createSitemapIndex( $container, $files ); |
|
55 | + $files = $this->export($container); |
|
56 | + $this->createSitemapIndex($container, $files); |
|
57 | 57 | |
58 | 58 | $container->close(); |
59 | 59 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param \Aimeos\MW\Container\Content\Iface $content File content object |
66 | 66 | * @param \Aimeos\MShop\Product\Item\Iface[] $items List of product items |
67 | 67 | */ |
68 | - protected function addItems( \Aimeos\MW\Container\Content\Iface $content, array $items ) |
|
68 | + protected function addItems(\Aimeos\MW\Container\Content\Iface $content, array $items) |
|
69 | 69 | { |
70 | 70 | $config = $this->getContext()->getConfig(); |
71 | 71 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @see controller/jobs/product/export/sitemap/max-items |
97 | 97 | * @see controller/jobs/product/export/sitemap/max-query |
98 | 98 | */ |
99 | - $changefreq = $config->get( 'controller/jobs/product/export/sitemap/changefreq', 'daily' ); |
|
99 | + $changefreq = $config->get('controller/jobs/product/export/sitemap/changefreq', 'daily'); |
|
100 | 100 | |
101 | 101 | /** controller/jobs/product/export/sitemap/standard/template-items |
102 | 102 | * Relative path to the XML items template of the product site map job controller. |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $view->siteItems = $items; |
130 | 130 | $view->siteFreq = $changefreq; |
131 | 131 | |
132 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
132 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @see controller/jobs/product/export/sitemap/max-query |
176 | 176 | * @see controller/jobs/product/export/sitemap/changefreq |
177 | 177 | */ |
178 | - $location = $config->get( 'controller/jobs/product/export/sitemap/location' ); |
|
178 | + $location = $config->get('controller/jobs/product/export/sitemap/location'); |
|
179 | 179 | |
180 | 180 | /** controller/jobs/product/export/sitemap/container/options |
181 | 181 | * List of file container options for the site map files |
@@ -196,16 +196,16 @@ discard block |
||
196 | 196 | * @see controller/jobs/product/export/sitemap/max-query |
197 | 197 | * @see controller/jobs/product/export/sitemap/changefreq |
198 | 198 | */ |
199 | - $default = array( 'gzip-mode' => 'wb' ); |
|
200 | - $options = $config->get( 'controller/jobs/product/export/sitemap/container/options', $default ); |
|
199 | + $default = array('gzip-mode' => 'wb'); |
|
200 | + $options = $config->get('controller/jobs/product/export/sitemap/container/options', $default); |
|
201 | 201 | |
202 | - if( $location === null ) |
|
202 | + if ($location === null) |
|
203 | 203 | { |
204 | - $msg = sprintf( 'Required configuration for "%1$s" is missing', 'controller/jobs/product/export/sitemap/location' ); |
|
205 | - throw new \Aimeos\Controller\Jobs\Exception( $msg ); |
|
204 | + $msg = sprintf('Required configuration for "%1$s" is missing', 'controller/jobs/product/export/sitemap/location'); |
|
205 | + throw new \Aimeos\Controller\Jobs\Exception($msg); |
|
206 | 206 | } |
207 | 207 | |
208 | - return \Aimeos\MW\Container\Factory::getContainer( $location, 'Directory', 'Gzip', $options ); |
|
208 | + return \Aimeos\MW\Container\Factory::getContainer($location, 'Directory', 'Gzip', $options); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @param integer $filenum New file number |
217 | 217 | * @return \Aimeos\MW\Container\Content\Iface New content object |
218 | 218 | */ |
219 | - protected function createContent( \Aimeos\MW\Container\Iface $container, $filenum ) |
|
219 | + protected function createContent(\Aimeos\MW\Container\Iface $container, $filenum) |
|
220 | 220 | { |
221 | 221 | /** controller/jobs/product/export/sitemap/standard/template-header |
222 | 222 | * Relative path to the XML site map header template of the product site map job controller. |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | $context = $this->getContext(); |
247 | 247 | $view = $context->getView(); |
248 | 248 | |
249 | - $content = $container->create( $this->getFilename( $filenum ) ); |
|
250 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
251 | - $container->add( $content ); |
|
249 | + $content = $container->create($this->getFilename($filenum)); |
|
250 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
251 | + $container->add($content); |
|
252 | 252 | |
253 | 253 | return $content; |
254 | 254 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * |
260 | 260 | * @param \Aimeos\MW\Container\Content\Iface $content |
261 | 261 | */ |
262 | - protected function closeContent( \Aimeos\MW\Container\Content\Iface $content ) |
|
262 | + protected function closeContent(\Aimeos\MW\Container\Content\Iface $content) |
|
263 | 263 | { |
264 | 264 | /** controller/jobs/product/export/sitemap/standard/template-footer |
265 | 265 | * Relative path to the XML site map footer template of the product site map job controller. |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $context = $this->getContext(); |
290 | 290 | $view = $context->getView(); |
291 | 291 | |
292 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
292 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | * @param \Aimeos\MW\Container\Iface $container File container object |
300 | 300 | * @param array $files List of generated site map file names |
301 | 301 | */ |
302 | - protected function createSitemapIndex( \Aimeos\MW\Container\Iface $container, array $files ) |
|
302 | + protected function createSitemapIndex(\Aimeos\MW\Container\Iface $container, array $files) |
|
303 | 303 | { |
304 | 304 | /** controller/jobs/product/export/sitemap/standard/template-index |
305 | 305 | * Relative path to the XML site map index template of the product site map job controller. |
@@ -331,9 +331,9 @@ discard block |
||
331 | 331 | |
332 | 332 | $view->siteFiles = $files; |
333 | 333 | |
334 | - $content = $container->create( 'aimeos-sitemap-index.xml' ); |
|
335 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
336 | - $container->add( $content ); |
|
334 | + $content = $container->create('aimeos-sitemap-index.xml'); |
|
335 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
336 | + $container->add($content); |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | |
@@ -344,44 +344,44 @@ discard block |
||
344 | 344 | * @param boolean $default True to filter exported products by default criteria |
345 | 345 | * @return array List of content (file) names |
346 | 346 | */ |
347 | - protected function export( \Aimeos\MW\Container\Iface $container, $default = true ) |
|
347 | + protected function export(\Aimeos\MW\Container\Iface $container, $default = true) |
|
348 | 348 | { |
349 | - $domains = $this->getConfig( 'domains', [] ); |
|
350 | - $maxItems = $this->getConfig( 'max-items', 10000 ); |
|
351 | - $maxQuery = $this->getConfig( 'max-query', 1000 ); |
|
349 | + $domains = $this->getConfig('domains', []); |
|
350 | + $maxItems = $this->getConfig('max-items', 10000); |
|
351 | + $maxQuery = $this->getConfig('max-query', 1000); |
|
352 | 352 | |
353 | 353 | $start = 0; $filenum = 1; |
354 | 354 | $names = []; |
355 | 355 | |
356 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'index' ); |
|
356 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'index'); |
|
357 | 357 | |
358 | - $search = $manager->createSearch( $default ); |
|
359 | - $search->setConditions( $search->compare( '!=', 'index.catalog.id', null ) ); |
|
360 | - $search->setSortations( array( $search->sort( '+', 'product.id' ) ) ); |
|
361 | - $search->setSlice( 0, $maxQuery ); |
|
358 | + $search = $manager->createSearch($default); |
|
359 | + $search->setConditions($search->compare('!=', 'index.catalog.id', null)); |
|
360 | + $search->setSortations(array($search->sort('+', 'product.id'))); |
|
361 | + $search->setSlice(0, $maxQuery); |
|
362 | 362 | |
363 | - $content = $this->createContent( $container, $filenum ); |
|
363 | + $content = $this->createContent($container, $filenum); |
|
364 | 364 | $names[] = $content->getResource(); |
365 | 365 | |
366 | 366 | do |
367 | 367 | { |
368 | - $items = $manager->searchItems( $search, $domains ); |
|
369 | - $this->addItems( $content, $items ); |
|
368 | + $items = $manager->searchItems($search, $domains); |
|
369 | + $this->addItems($content, $items); |
|
370 | 370 | |
371 | - $count = count( $items ); |
|
371 | + $count = count($items); |
|
372 | 372 | $start += $count; |
373 | - $search->setSlice( $start, $maxQuery ); |
|
373 | + $search->setSlice($start, $maxQuery); |
|
374 | 374 | |
375 | - if( $start + $maxQuery > $maxItems * $filenum ) |
|
375 | + if ($start + $maxQuery > $maxItems * $filenum) |
|
376 | 376 | { |
377 | - $this->closeContent( $content ); |
|
378 | - $content = $this->createContent( $container, ++$filenum ); |
|
377 | + $this->closeContent($content); |
|
378 | + $content = $this->createContent($container, ++$filenum); |
|
379 | 379 | $names[] = $content->getResource(); |
380 | 380 | } |
381 | 381 | } |
382 | - while( $count >= $search->getSliceSize() ); |
|
382 | + while ($count >= $search->getSliceSize()); |
|
383 | 383 | |
384 | - $this->closeContent( $content ); |
|
384 | + $this->closeContent($content); |
|
385 | 385 | |
386 | 386 | return $names; |
387 | 387 | } |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | * @param mixed $default Default value if name is unknown |
395 | 395 | * @return mixed Configuration value |
396 | 396 | */ |
397 | - protected function getConfig( $name, $default = null ) |
|
397 | + protected function getConfig($name, $default = null) |
|
398 | 398 | { |
399 | 399 | $config = $this->getContext()->getConfig(); |
400 | 400 | |
401 | - switch( $name ) |
|
401 | + switch ($name) |
|
402 | 402 | { |
403 | 403 | case 'domains': |
404 | 404 | /** controller/jobs/product/export/sitemap/domains |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | * @see controller/jobs/product/export/sitemap/max-query |
420 | 420 | * @see controller/jobs/product/export/sitemap/changefreq |
421 | 421 | */ |
422 | - return $config->get( 'controller/jobs/product/export/sitemap/domains', $default ); |
|
422 | + return $config->get('controller/jobs/product/export/sitemap/domains', $default); |
|
423 | 423 | |
424 | 424 | case 'max-items': |
425 | 425 | /** controller/jobs/product/export/sitemap/max-items |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * @see controller/jobs/product/export/sitemap/changefreq |
445 | 445 | * @see controller/jobs/product/export/sitemap/domains |
446 | 446 | */ |
447 | - return $config->get( 'controller/jobs/product/export/sitemap/max-items', 50000 ); |
|
447 | + return $config->get('controller/jobs/product/export/sitemap/max-items', 50000); |
|
448 | 448 | |
449 | 449 | case 'max-query': |
450 | 450 | /** controller/jobs/product/export/sitemap/max-query |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | * @see controller/jobs/product/export/sitemap/changefreq |
466 | 466 | * @see controller/jobs/product/export/sitemap/domains |
467 | 467 | */ |
468 | - return $config->get( 'controller/jobs/product/export/sitemap/max-query', 1000 ); |
|
468 | + return $config->get('controller/jobs/product/export/sitemap/max-query', 1000); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | return $default; |
@@ -478,8 +478,8 @@ discard block |
||
478 | 478 | * @param integer $number Current file number |
479 | 479 | * @return string New file name |
480 | 480 | */ |
481 | - protected function getFilename( $number ) |
|
481 | + protected function getFilename($number) |
|
482 | 482 | { |
483 | - return sprintf( 'aimeos-sitemap-%d.xml', $number ); |
|
483 | + return sprintf('aimeos-sitemap-%d.xml', $number); |
|
484 | 484 | } |
485 | 485 | } |