@@ -128,7 +128,6 @@ discard block |
||
128 | 128 | * Adds the given addresses to the basket |
129 | 129 | * |
130 | 130 | * @param \Aimeos\MShop\Context\Item\Iface Context object |
131 | - * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to add the addresses to |
|
132 | 131 | * @param array $addresses Associative list of type as key and address object implementing \Aimeos\MShop\Order\Item\Base\Address\Iface as value |
133 | 132 | * @return \Aimeos\MShop\Order\Item\Base\Iface Order with addresses added |
134 | 133 | */ |
@@ -205,7 +204,6 @@ discard block |
||
205 | 204 | * Adds the given products to the basket |
206 | 205 | * |
207 | 206 | * @param \Aimeos\MShop\Context\Item\Iface Context object |
208 | - * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to add the products to |
|
209 | 207 | * @param \Aimeos\MShop\Order\Item\Base\Product\Iface[] $orderProducts List of product items |
210 | 208 | * @param string $orderProductId Unique ID of the ordered subscription product |
211 | 209 | * @return \Aimeos\MShop\Order\Item\Base\Iface Order with products added |
@@ -232,7 +230,6 @@ discard block |
||
232 | 230 | * Adds a matching delivery and payment service to the basket |
233 | 231 | * |
234 | 232 | * @param \Aimeos\MShop\Context\Item\Iface Context object |
235 | - * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to add the services to |
|
236 | 233 | * @param array $services Associative list of type as key and list of service objects implementing \Aimeos\MShop\Order\Item\Base\Service\Iface as values |
237 | 234 | * @return \Aimeos\MShop\Order\Item\Base\Iface Order with delivery and payment service added |
238 | 235 | */ |
@@ -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 renew' ); |
|
31 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Subscription process renew'); |
|
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', 'Renews subscriptions at next date' ); |
|
42 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Renews subscriptions at next date'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -54,73 +54,73 @@ discard block |
||
54 | 54 | $config = $context->getConfig(); |
55 | 55 | $logger = $context->getLogger(); |
56 | 56 | |
57 | - $names = (array) $config->get( 'controller/common/subscription/process/processors', [] ); |
|
57 | + $names = (array) $config->get('controller/common/subscription/process/processors', []); |
|
58 | 58 | |
59 | - $date = date( 'Y-m-d' ); |
|
60 | - $processors = $this->getProcessors( $names ); |
|
61 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' ); |
|
59 | + $date = date('Y-m-d'); |
|
60 | + $processors = $this->getProcessors($names); |
|
61 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'subscription'); |
|
62 | 62 | |
63 | - $search = $manager->createSearch( true ); |
|
63 | + $search = $manager->createSearch(true); |
|
64 | 64 | $expr = [ |
65 | - $search->compare( '<=', 'subscription.datenext', $date ), |
|
66 | - $search->combine( '||', [ |
|
67 | - $search->compare( '==', 'subscription.dateend', null ), |
|
68 | - $search->compare( '>', 'subscription.dateend', $date ), |
|
69 | - ] ), |
|
65 | + $search->compare('<=', 'subscription.datenext', $date), |
|
66 | + $search->combine('||', [ |
|
67 | + $search->compare('==', 'subscription.dateend', null), |
|
68 | + $search->compare('>', 'subscription.dateend', $date), |
|
69 | + ]), |
|
70 | 70 | $search->getConditions(), |
71 | 71 | ]; |
72 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
73 | - $search->setSortations( [$search->sort( '+', 'subscription.id' )] ); |
|
72 | + $search->setConditions($search->combine('&&', $expr)); |
|
73 | + $search->setSortations([$search->sort('+', 'subscription.id')]); |
|
74 | 74 | |
75 | 75 | $start = 0; |
76 | 76 | |
77 | 77 | do |
78 | 78 | { |
79 | - $search->setSlice( $start, 100 ); |
|
80 | - $items = $manager->searchItems( $search ); |
|
79 | + $search->setSlice($start, 100); |
|
80 | + $items = $manager->searchItems($search); |
|
81 | 81 | |
82 | - foreach( $items as $item ) |
|
82 | + foreach ($items as $item) |
|
83 | 83 | { |
84 | 84 | try |
85 | 85 | { |
86 | - $context = $this->createContext( $item->getOrderBaseId() ); |
|
87 | - $newOrder = $this->createOrderBase( $context, $item ); |
|
88 | - $newInvoice = $this->createOrderInvoice( $context, $newOrder ); |
|
86 | + $context = $this->createContext($item->getOrderBaseId()); |
|
87 | + $newOrder = $this->createOrderBase($context, $item); |
|
88 | + $newInvoice = $this->createOrderInvoice($context, $newOrder); |
|
89 | 89 | |
90 | 90 | try |
91 | 91 | { |
92 | - $this->createPayment( $context, $newOrder, $newInvoice ); |
|
92 | + $this->createPayment($context, $newOrder, $newInvoice); |
|
93 | 93 | |
94 | - $interval = new \DateInterval( $item->getInterval() ); |
|
95 | - $item->setDateNext( date_create()->add( $interval )->format( 'Y-m-d' ) ); |
|
94 | + $interval = new \DateInterval($item->getInterval()); |
|
95 | + $item->setDateNext(date_create()->add($interval)->format('Y-m-d')); |
|
96 | 96 | } |
97 | - catch( \Exception $e ) |
|
97 | + catch (\Exception $e) |
|
98 | 98 | { |
99 | - $item->setReason( \Aimeos\MShop\Subscription\Item\Iface::REASON_PAYMENT ); |
|
100 | - $item->setDateEnd( date_create()->format( 'Y-m-d' ) ); |
|
101 | - $manager->saveItem( $item ); |
|
99 | + $item->setReason(\Aimeos\MShop\Subscription\Item\Iface::REASON_PAYMENT); |
|
100 | + $item->setDateEnd(date_create()->format('Y-m-d')); |
|
101 | + $manager->saveItem($item); |
|
102 | 102 | |
103 | 103 | throw $e; |
104 | 104 | } |
105 | 105 | |
106 | - $manager->saveItem( $item ); |
|
106 | + $manager->saveItem($item); |
|
107 | 107 | |
108 | - foreach( $processors as $processor ) { |
|
109 | - $processor->renew( $item, $newInvoice ); |
|
108 | + foreach ($processors as $processor) { |
|
109 | + $processor->renew($item, $newInvoice); |
|
110 | 110 | } |
111 | 111 | } |
112 | - catch( \Exception $e ) |
|
112 | + catch (\Exception $e) |
|
113 | 113 | { |
114 | 114 | $msg = 'Unable to process subscription with ID "%1$s": %2$s'; |
115 | - $logger->log( sprintf( $msg, $item->getId(), $e->getMessage() ) ); |
|
116 | - $logger->log( $e->getTraceAsString() ); |
|
115 | + $logger->log(sprintf($msg, $item->getId(), $e->getMessage())); |
|
116 | + $logger->log($e->getTraceAsString()); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | - $count = count( $items ); |
|
120 | + $count = count($items); |
|
121 | 121 | $start += $count; |
122 | 122 | } |
123 | - while( $count === $search->getSliceSize() ); |
|
123 | + while ($count === $search->getSliceSize()); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | * @param array $addresses Associative list of type as key and address object implementing \Aimeos\MShop\Order\Item\Base\Address\Iface as value |
133 | 133 | * @return \Aimeos\MShop\Order\Item\Base\Iface Order with addresses added |
134 | 134 | */ |
135 | - protected function addBasketAddresses( \Aimeos\MShop\Context\Item\Iface $context, |
|
136 | - \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $addresses ) |
|
135 | + protected function addBasketAddresses(\Aimeos\MShop\Context\Item\Iface $context, |
|
136 | + \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $addresses) |
|
137 | 137 | { |
138 | - foreach( $addresses as $type => $orderAddress ) { |
|
139 | - $newBasket->setAddress( $orderAddress, $type ); |
|
138 | + foreach ($addresses as $type => $orderAddress) { |
|
139 | + $newBasket->setAddress($orderAddress, $type); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | return $newBasket; |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | * @param array $codes List of coupon codes that should be added to the given basket |
152 | 152 | * @return \Aimeos\MShop\Order\Item\Base\Iface Basket, maybe with coupons added |
153 | 153 | */ |
154 | - protected function addBasketCoupons( \Aimeos\MShop\Context\Item\Iface $context, |
|
155 | - \Aimeos\MShop\Order\Item\Base\Iface $basket, array $codes ) |
|
154 | + protected function addBasketCoupons(\Aimeos\MShop\Context\Item\Iface $context, |
|
155 | + \Aimeos\MShop\Order\Item\Base\Iface $basket, array $codes) |
|
156 | 156 | { |
157 | 157 | /** controller/jobs/subcription/process/renew/standard/use-coupons |
158 | 158 | * |
@@ -166,34 +166,34 @@ discard block |
||
166 | 166 | * @category User |
167 | 167 | * @since 2018.10 |
168 | 168 | */ |
169 | - if( $context->getConfig()->get( 'controller/jobs/subcription/process/renew/standard/use-coupons', false ) ) |
|
169 | + if ($context->getConfig()->get('controller/jobs/subcription/process/renew/standard/use-coupons', false)) |
|
170 | 170 | { |
171 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'coupon' ); |
|
172 | - $codeManager = \Aimeos\MShop\Factory::createManager( $context, 'coupon/code' ); |
|
171 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'coupon'); |
|
172 | + $codeManager = \Aimeos\MShop\Factory::createManager($context, 'coupon/code'); |
|
173 | 173 | |
174 | - foreach( $codes as $code ) |
|
174 | + foreach ($codes as $code) |
|
175 | 175 | { |
176 | - $search = $manager->createSearch( true )->setSlice( 0, 1 ); |
|
176 | + $search = $manager->createSearch(true)->setSlice(0, 1); |
|
177 | 177 | $expr = [ |
178 | - $search->compare( '==', 'coupon.code.code', $code ), |
|
179 | - $codeManager->createSearch( true )->getConditions(), |
|
178 | + $search->compare('==', 'coupon.code.code', $code), |
|
179 | + $codeManager->createSearch(true)->getConditions(), |
|
180 | 180 | $search->getConditions(), |
181 | 181 | ]; |
182 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
182 | + $search->setConditions($search->combine('&&', $expr)); |
|
183 | 183 | |
184 | - $result = $manager->searchItems( $search ); |
|
184 | + $result = $manager->searchItems($search); |
|
185 | 185 | |
186 | - if( ( $item = reset( $result ) ) === false ) { |
|
186 | + if (($item = reset($result)) === false) { |
|
187 | 187 | continue; |
188 | 188 | } |
189 | 189 | |
190 | - $provider = $manager->getProvider( $item, $code ); |
|
190 | + $provider = $manager->getProvider($item, $code); |
|
191 | 191 | |
192 | - if( $provider->isAvailable( $basket ) !== true ) { |
|
192 | + if ($provider->isAvailable($basket) !== true) { |
|
193 | 193 | continue; |
194 | 194 | } |
195 | 195 | |
196 | - $provider->addCoupon( $basket ); |
|
196 | + $provider->addCoupon($basket); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | |
@@ -210,17 +210,17 @@ discard block |
||
210 | 210 | * @param string $orderProductId Unique ID of the ordered subscription product |
211 | 211 | * @return \Aimeos\MShop\Order\Item\Base\Iface Order with products added |
212 | 212 | */ |
213 | - protected function addBasketProducts( \Aimeos\MShop\Context\Item\Iface $context, |
|
214 | - \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $orderProducts, $orderProductId ) |
|
213 | + protected function addBasketProducts(\Aimeos\MShop\Context\Item\Iface $context, |
|
214 | + \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $orderProducts, $orderProductId) |
|
215 | 215 | { |
216 | - foreach( $orderProducts as $orderProduct ) |
|
216 | + foreach ($orderProducts as $orderProduct) |
|
217 | 217 | { |
218 | - if( $orderProduct->getId() == $orderProductId ) |
|
218 | + if ($orderProduct->getId() == $orderProductId) |
|
219 | 219 | { |
220 | - foreach( $orderProduct->getAttributeItems() as $attrItem ) { |
|
221 | - $attrItem->setId( null ); |
|
220 | + foreach ($orderProduct->getAttributeItems() as $attrItem) { |
|
221 | + $attrItem->setId(null); |
|
222 | 222 | } |
223 | - $newBasket->addProduct( $orderProduct->setId( null ) ); |
|
223 | + $newBasket->addProduct($orderProduct->setId(null)); |
|
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
@@ -236,35 +236,35 @@ discard block |
||
236 | 236 | * @param array $services Associative list of type as key and list of service objects implementing \Aimeos\MShop\Order\Item\Base\Service\Iface as values |
237 | 237 | * @return \Aimeos\MShop\Order\Item\Base\Iface Order with delivery and payment service added |
238 | 238 | */ |
239 | - protected function addBasketServices( \Aimeos\MShop\Context\Item\Iface $context, |
|
240 | - \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $services ) |
|
239 | + protected function addBasketServices(\Aimeos\MShop\Context\Item\Iface $context, |
|
240 | + \Aimeos\MShop\Order\Item\Base\Iface $newBasket, array $services) |
|
241 | 241 | { |
242 | 242 | $type = \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT; |
243 | 243 | |
244 | - if( isset( $services[$type] ) ) |
|
244 | + if (isset($services[$type])) |
|
245 | 245 | { |
246 | - foreach( $services[$type] as $orderService ) { |
|
247 | - $newBasket->addService( $orderService, $type ); |
|
246 | + foreach ($services[$type] as $orderService) { |
|
247 | + $newBasket->addService($orderService, $type); |
|
248 | 248 | } |
249 | 249 | } |
250 | 250 | |
251 | 251 | $type = \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_DELIVERY; |
252 | 252 | |
253 | - $serviceManager = \Aimeos\MShop\Factory::createManager( $context, 'service' ); |
|
254 | - $orderServiceManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base/service' ); |
|
253 | + $serviceManager = \Aimeos\MShop\Factory::createManager($context, 'service'); |
|
254 | + $orderServiceManager = \Aimeos\MShop\Factory::createManager($context, 'order/base/service'); |
|
255 | 255 | |
256 | - $search = $serviceManager->createSearch( true ); |
|
257 | - $search->setSortations( [$search->sort( '+', 'service.position' )] ); |
|
258 | - $search->setConditions( $search->compare( '==', 'service.type.code', $type ) ); |
|
256 | + $search = $serviceManager->createSearch(true); |
|
257 | + $search->setSortations([$search->sort('+', 'service.position')]); |
|
258 | + $search->setConditions($search->compare('==', 'service.type.code', $type)); |
|
259 | 259 | |
260 | - foreach( $serviceManager->searchItems( $search, ['media', 'price', 'text'] ) as $item ) |
|
260 | + foreach ($serviceManager->searchItems($search, ['media', 'price', 'text']) as $item) |
|
261 | 261 | { |
262 | - $provider = $serviceManager->getProvider( $item, $item->getType() ); |
|
262 | + $provider = $serviceManager->getProvider($item, $item->getType()); |
|
263 | 263 | |
264 | - if( $provider->isAvailable( $newBasket ) === true ) |
|
264 | + if ($provider->isAvailable($newBasket) === true) |
|
265 | 265 | { |
266 | - $orderServiceItem = $orderServiceManager->createItem()->copyFrom( $item ); |
|
267 | - return $newBasket->addService( $orderServiceItem, $type ); |
|
266 | + $orderServiceItem = $orderServiceManager->createItem()->copyFrom($item); |
|
267 | + return $newBasket->addService($orderServiceItem, $type); |
|
268 | 268 | } |
269 | 269 | } |
270 | 270 | |
@@ -278,30 +278,30 @@ discard block |
||
278 | 278 | * @param string $baseId Unique order base ID |
279 | 279 | * @return \Aimeos\MShop\Context\Item\Iface New context object |
280 | 280 | */ |
281 | - protected function createContext( $baseId ) |
|
281 | + protected function createContext($baseId) |
|
282 | 282 | { |
283 | 283 | $context = clone $this->getContext(); |
284 | 284 | |
285 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' ); |
|
286 | - $baseItem = $manager->getItem( $baseId ); |
|
285 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order/base'); |
|
286 | + $baseItem = $manager->getItem($baseId); |
|
287 | 287 | |
288 | 288 | $locale = $baseItem->getLocale(); |
289 | 289 | $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; |
290 | 290 | |
291 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'locale' ); |
|
292 | - $locale = $manager->bootstrap( $baseItem->getSiteCode(), $locale->getLanguageId(), $locale->getCurrencyId(), false, $level ); |
|
291 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'locale'); |
|
292 | + $locale = $manager->bootstrap($baseItem->getSiteCode(), $locale->getLanguageId(), $locale->getCurrencyId(), false, $level); |
|
293 | 293 | |
294 | - $context->setLocale( $locale ); |
|
294 | + $context->setLocale($locale); |
|
295 | 295 | |
296 | 296 | try |
297 | 297 | { |
298 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' ); |
|
299 | - $customerItem = $manager->getItem( $baseItem->getCustomerId(), ['customer/group'] ); |
|
298 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'customer'); |
|
299 | + $customerItem = $manager->getItem($baseItem->getCustomerId(), ['customer/group']); |
|
300 | 300 | |
301 | - $context->setUserId( $baseItem->getCustomerId() ); |
|
302 | - $context->setGroupIds( $customerItem->getGroups() ); |
|
301 | + $context->setUserId($baseItem->getCustomerId()); |
|
302 | + $context->setGroupIds($customerItem->getGroups()); |
|
303 | 303 | } |
304 | - catch( \Exception $e ) {} // Subscription without account |
|
304 | + catch (\Exception $e) {} // Subscription without account |
|
305 | 305 | |
306 | 306 | return $context; |
307 | 307 | } |
@@ -314,19 +314,19 @@ discard block |
||
314 | 314 | * @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item with order base ID and order product ID |
315 | 315 | * @return \Aimeos\MShop\Order\Item\Base\Iface Complete order with product, addresses and services saved to the storage |
316 | 316 | */ |
317 | - protected function createOrderBase( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Subscription\Item\Iface $subscription ) |
|
317 | + protected function createOrderBase(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Subscription\Item\Iface $subscription) |
|
318 | 318 | { |
319 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' ); |
|
319 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order/base'); |
|
320 | 320 | |
321 | - $basket = $manager->load( $subscription->getOrderBaseId() ); |
|
322 | - $newBasket = $manager->createItem()->setCustomerId( $basket->getCustomerId() ); |
|
321 | + $basket = $manager->load($subscription->getOrderBaseId()); |
|
322 | + $newBasket = $manager->createItem()->setCustomerId($basket->getCustomerId()); |
|
323 | 323 | |
324 | - $newBasket = $this->addBasketProducts( $context, $newBasket, $basket->getProducts(), $subscription->getOrderProductId() ); |
|
325 | - $newBasket = $this->addBasketAddresses( $context, $newBasket, $basket->getAddresses() ); |
|
326 | - $newBasket = $this->addBasketServices( $context, $newBasket, $basket->getServices() ); |
|
327 | - $newBasket = $this->addBasketCoupons( $context, $newBasket, array_keys( $basket->getCoupons() ) ); |
|
324 | + $newBasket = $this->addBasketProducts($context, $newBasket, $basket->getProducts(), $subscription->getOrderProductId()); |
|
325 | + $newBasket = $this->addBasketAddresses($context, $newBasket, $basket->getAddresses()); |
|
326 | + $newBasket = $this->addBasketServices($context, $newBasket, $basket->getServices()); |
|
327 | + $newBasket = $this->addBasketCoupons($context, $newBasket, array_keys($basket->getCoupons())); |
|
328 | 328 | |
329 | - return $manager->store( $newBasket ); |
|
329 | + return $manager->store($newBasket); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | |
@@ -337,15 +337,15 @@ discard block |
||
337 | 337 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Complete order with product, addresses and services saved to the storage |
338 | 338 | * @return \Aimeos\MShop\Order\Item\Iface New invoice item associated to the order saved to the storage |
339 | 339 | */ |
340 | - protected function createOrderInvoice( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
|
340 | + protected function createOrderInvoice(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket) |
|
341 | 341 | { |
342 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
342 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
343 | 343 | |
344 | 344 | $item = $manager->createItem(); |
345 | - $item->setBaseId( $basket->getId() ); |
|
346 | - $item->setType( 'subscription' ); |
|
345 | + $item->setBaseId($basket->getId()); |
|
346 | + $item->setType('subscription'); |
|
347 | 347 | |
348 | - return $manager->saveItem( $item ); |
|
348 | + return $manager->saveItem($item); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | |
@@ -356,17 +356,17 @@ discard block |
||
356 | 356 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Complete order with product, addresses and services |
357 | 357 | * @param \Aimeos\MShop\Order\Item\Iface New invoice item associated to the order |
358 | 358 | */ |
359 | - protected function createPayment( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket, |
|
360 | - \Aimeos\MShop\Order\Item\Iface $invoice ) |
|
359 | + protected function createPayment(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Order\Item\Base\Iface $basket, |
|
360 | + \Aimeos\MShop\Order\Item\Iface $invoice) |
|
361 | 361 | { |
362 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'service' ); |
|
362 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'service'); |
|
363 | 363 | |
364 | - foreach( $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT ) as $service ) |
|
364 | + foreach ($basket->getService(\Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT) as $service) |
|
365 | 365 | { |
366 | - $item = $manager->getItem( $service->getServiceId() ); |
|
367 | - $provider = $manager->getProvider( $item, 'payment' ); |
|
366 | + $item = $manager->getItem($service->getServiceId()); |
|
367 | + $provider = $manager->getProvider($item, 'payment'); |
|
368 | 368 | |
369 | - $provider->repay( $invoice ); |
|
369 | + $provider->repay($invoice); |
|
370 | 370 | } |
371 | 371 | } |
372 | 372 | } |
@@ -263,6 +263,9 @@ |
||
263 | 263 | } |
264 | 264 | |
265 | 265 | |
266 | + /** |
|
267 | + * @param string $name |
|
268 | + */ |
|
266 | 269 | protected function access( $name ) |
267 | 270 | { |
268 | 271 | $class = new \ReflectionClass( \Aimeos\Controller\Jobs\Subscription\Process\Renew\Standard::class ); |
@@ -21,62 +21,62 @@ discard block |
||
21 | 21 | $this->aimeos = \TestHelperJobs::getAimeos(); |
22 | 22 | $this->context = \TestHelperJobs::getContext(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Controller\Jobs\Subscription\Process\Renew\Standard( $this->context, $this->aimeos ); |
|
24 | + $this->object = new \Aimeos\Controller\Jobs\Subscription\Process\Renew\Standard($this->context, $this->aimeos); |
|
25 | 25 | |
26 | - \Aimeos\MShop\Factory::setCache( true ); |
|
26 | + \Aimeos\MShop\Factory::setCache(true); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | 30 | protected function tearDown() |
31 | 31 | { |
32 | - \Aimeos\MShop\Factory::setCache( false ); |
|
32 | + \Aimeos\MShop\Factory::setCache(false); |
|
33 | 33 | \Aimeos\MShop\Factory::clear(); |
34 | 34 | |
35 | - unset( $this->object, $this->context, $this->aimeos ); |
|
35 | + unset($this->object, $this->context, $this->aimeos); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testGetName() |
40 | 40 | { |
41 | - $this->assertEquals( 'Subscription process renew', $this->object->getName() ); |
|
41 | + $this->assertEquals('Subscription process renew', $this->object->getName()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testGetDescription() |
46 | 46 | { |
47 | - $this->assertEquals( 'Renews subscriptions at next date', $this->object->getDescription() ); |
|
47 | + $this->assertEquals('Renews subscriptions at next date', $this->object->getDescription()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
51 | 51 | public function testRun() |
52 | 52 | { |
53 | - $this->context->getConfig()->set( 'controller/common/subscription/process/processors', ['cgroup'] ); |
|
53 | + $this->context->getConfig()->set('controller/common/subscription/process/processors', ['cgroup']); |
|
54 | 54 | $item = $this->getSubscription(); |
55 | 55 | |
56 | - $object = $this->getMockBuilder( '\\Aimeos\\Controller\\Jobs\\Subscription\\Process\\Renew\\Standard' ) |
|
57 | - ->setConstructorArgs( [$this->context, $this->aimeos] ) |
|
58 | - ->setMethods( ['createOrderBase', 'createOrderInvoice', 'createPayment'] ) |
|
56 | + $object = $this->getMockBuilder('\\Aimeos\\Controller\\Jobs\\Subscription\\Process\\Renew\\Standard') |
|
57 | + ->setConstructorArgs([$this->context, $this->aimeos]) |
|
58 | + ->setMethods(['createOrderBase', 'createOrderInvoice', 'createPayment']) |
|
59 | 59 | ->getMock(); |
60 | 60 | |
61 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Subscription\\Manager\\Standard' ) |
|
62 | - ->setConstructorArgs( [$this->context] ) |
|
63 | - ->setMethods( ['searchItems', 'saveItem'] ) |
|
61 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Subscription\\Manager\\Standard') |
|
62 | + ->setConstructorArgs([$this->context]) |
|
63 | + ->setMethods(['searchItems', 'saveItem']) |
|
64 | 64 | ->getMock(); |
65 | 65 | |
66 | - \Aimeos\MShop\Factory::injectManager( $this->context, 'subscription', $managerStub ); |
|
66 | + \Aimeos\MShop\Factory::injectManager($this->context, 'subscription', $managerStub); |
|
67 | 67 | |
68 | - $object->expects( $this->once() )->method( 'createOrderBase' ) |
|
69 | - ->will( $this->returnValue( $this->getOrderBaseItem( $item->getOrderBaseId() ) ) ); |
|
68 | + $object->expects($this->once())->method('createOrderBase') |
|
69 | + ->will($this->returnValue($this->getOrderBaseItem($item->getOrderBaseId()))); |
|
70 | 70 | |
71 | - $object->expects( $this->once() )->method( 'createOrderInvoice' ) |
|
72 | - ->will( $this->returnValue( $this->getOrderItem() ) ); |
|
71 | + $object->expects($this->once())->method('createOrderInvoice') |
|
72 | + ->will($this->returnValue($this->getOrderItem())); |
|
73 | 73 | |
74 | - $object->expects( $this->once() )->method( 'createPayment' ); |
|
74 | + $object->expects($this->once())->method('createPayment'); |
|
75 | 75 | |
76 | - $managerStub->expects( $this->once() )->method( 'searchItems' ) |
|
77 | - ->will( $this->returnValue( [$item] ) ); |
|
76 | + $managerStub->expects($this->once())->method('searchItems') |
|
77 | + ->will($this->returnValue([$item])); |
|
78 | 78 | |
79 | - $managerStub->expects( $this->once() )->method( 'saveItem' ); |
|
79 | + $managerStub->expects($this->once())->method('saveItem'); |
|
80 | 80 | |
81 | 81 | $object->run(); |
82 | 82 | } |
@@ -84,19 +84,19 @@ discard block |
||
84 | 84 | |
85 | 85 | public function testRunException() |
86 | 86 | { |
87 | - $this->context->getConfig()->set( 'controller/common/subscription/process/processors', ['cgroup'] ); |
|
87 | + $this->context->getConfig()->set('controller/common/subscription/process/processors', ['cgroup']); |
|
88 | 88 | |
89 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Subscription\\Manager\\Standard' ) |
|
90 | - ->setConstructorArgs( [$this->context] ) |
|
91 | - ->setMethods( ['searchItems', 'saveItem'] ) |
|
89 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Subscription\\Manager\\Standard') |
|
90 | + ->setConstructorArgs([$this->context]) |
|
91 | + ->setMethods(['searchItems', 'saveItem']) |
|
92 | 92 | ->getMock(); |
93 | 93 | |
94 | - \Aimeos\MShop\Factory::injectManager( $this->context, 'subscription', $managerStub ); |
|
94 | + \Aimeos\MShop\Factory::injectManager($this->context, 'subscription', $managerStub); |
|
95 | 95 | |
96 | - $managerStub->expects( $this->once() )->method( 'searchItems' ) |
|
97 | - ->will( $this->returnValue( [$managerStub->createItem()] ) ); |
|
96 | + $managerStub->expects($this->once())->method('searchItems') |
|
97 | + ->will($this->returnValue([$managerStub->createItem()])); |
|
98 | 98 | |
99 | - $managerStub->expects( $this->never() )->method( 'saveItem' ); |
|
99 | + $managerStub->expects($this->never())->method('saveItem'); |
|
100 | 100 | |
101 | 101 | $this->object->run(); |
102 | 102 | } |
@@ -104,79 +104,79 @@ discard block |
||
104 | 104 | |
105 | 105 | public function testAddBasketAddresses() |
106 | 106 | { |
107 | - $basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem(); |
|
108 | - $address = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base/address' )->createItem(); |
|
107 | + $basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem(); |
|
108 | + $address = \Aimeos\MShop\Factory::createManager($this->context, 'order/base/address')->createItem(); |
|
109 | 109 | |
110 | 110 | $addresses = ['payment' => $address]; |
111 | - $basket = $this->access( 'addBasketAddresses' )->invokeArgs( $this->object, [$this->context, $basket, $addresses] ); |
|
111 | + $basket = $this->access('addBasketAddresses')->invokeArgs($this->object, [$this->context, $basket, $addresses]); |
|
112 | 112 | |
113 | - $this->assertEquals( 1, count( $basket->getAddresses() ) ); |
|
114 | - $this->assertInstanceOf( \Aimeos\MShop\Order\Item\Base\Address\Iface::class, $basket->getAddress( 'payment' ) ); |
|
113 | + $this->assertEquals(1, count($basket->getAddresses())); |
|
114 | + $this->assertInstanceOf(\Aimeos\MShop\Order\Item\Base\Address\Iface::class, $basket->getAddress('payment')); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | |
118 | 118 | public function testAddBasketCoupons() |
119 | 119 | { |
120 | - $this->context->getConfig()->set( 'controller/jobs/subcription/process/renew/standard/use-coupons', true ); |
|
120 | + $this->context->getConfig()->set('controller/jobs/subcription/process/renew/standard/use-coupons', true); |
|
121 | 121 | |
122 | - $basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem(); |
|
123 | - $product = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->findItem( 'CNC', ['price'] ); |
|
124 | - $orderProduct = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base/product' )->createItem(); |
|
122 | + $basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem(); |
|
123 | + $product = \Aimeos\MShop\Factory::createManager($this->context, 'product')->findItem('CNC', ['price']); |
|
124 | + $orderProduct = \Aimeos\MShop\Factory::createManager($this->context, 'order/base/product')->createItem(); |
|
125 | 125 | |
126 | - $price = $product->getRefItems( 'price', 'default', 'default' ); |
|
127 | - $basket->addProduct( $orderProduct->copyFrom( $product )->setPrice( reset( $price ) ) ); |
|
126 | + $price = $product->getRefItems('price', 'default', 'default'); |
|
127 | + $basket->addProduct($orderProduct->copyFrom($product)->setPrice(reset($price))); |
|
128 | 128 | |
129 | - $this->assertEquals( '600.00', $basket->getPrice()->getValue() ); |
|
130 | - $this->assertEquals( '30.00', $basket->getPrice()->getCosts() ); |
|
131 | - $this->assertEquals( '0.00', $basket->getPrice()->getRebate() ); |
|
129 | + $this->assertEquals('600.00', $basket->getPrice()->getValue()); |
|
130 | + $this->assertEquals('30.00', $basket->getPrice()->getCosts()); |
|
131 | + $this->assertEquals('0.00', $basket->getPrice()->getRebate()); |
|
132 | 132 | |
133 | - $basket = $this->access( 'addBasketCoupons' )->invokeArgs( $this->object, [$this->context, $basket, ['90AB']] ); |
|
133 | + $basket = $this->access('addBasketCoupons')->invokeArgs($this->object, [$this->context, $basket, ['90AB']]); |
|
134 | 134 | |
135 | - $this->assertEquals( 1, count( $basket->getCoupons() ) ); |
|
136 | - $this->assertEquals( 2, count( $basket->getProducts() ) ); |
|
137 | - $this->assertEquals( '537.00', $basket->getPrice()->getValue() ); |
|
138 | - $this->assertEquals( '30.00', $basket->getPrice()->getCosts() ); |
|
139 | - $this->assertEquals( '63.00', $basket->getPrice()->getRebate() ); |
|
135 | + $this->assertEquals(1, count($basket->getCoupons())); |
|
136 | + $this->assertEquals(2, count($basket->getProducts())); |
|
137 | + $this->assertEquals('537.00', $basket->getPrice()->getValue()); |
|
138 | + $this->assertEquals('30.00', $basket->getPrice()->getCosts()); |
|
139 | + $this->assertEquals('63.00', $basket->getPrice()->getRebate()); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | |
143 | 143 | public function testAddBasketProducts() |
144 | 144 | { |
145 | - $basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem(); |
|
146 | - $product = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->findItem( 'CNC' ); |
|
147 | - $manager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base/product' ); |
|
145 | + $basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem(); |
|
146 | + $product = \Aimeos\MShop\Factory::createManager($this->context, 'product')->findItem('CNC'); |
|
147 | + $manager = \Aimeos\MShop\Factory::createManager($this->context, 'order/base/product'); |
|
148 | 148 | |
149 | 149 | $orderProducts = [ |
150 | - $manager->createItem()->copyFrom( $product )->setId( 1 ), |
|
151 | - $manager->createItem()->copyFrom( $product )->setId( 2 ), |
|
150 | + $manager->createItem()->copyFrom($product)->setId(1), |
|
151 | + $manager->createItem()->copyFrom($product)->setId(2), |
|
152 | 152 | ]; |
153 | 153 | |
154 | - $basket = $this->access( 'addBasketProducts' )->invokeArgs( $this->object, [$this->context, $basket, $orderProducts, 1] ); |
|
154 | + $basket = $this->access('addBasketProducts')->invokeArgs($this->object, [$this->context, $basket, $orderProducts, 1]); |
|
155 | 155 | |
156 | - $this->assertEquals( 1, count( $basket->getProducts() ) ); |
|
157 | - $this->assertNull( $basket->getProduct( 0 )->getId() ); |
|
156 | + $this->assertEquals(1, count($basket->getProducts())); |
|
157 | + $this->assertNull($basket->getProduct(0)->getId()); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | |
161 | 161 | public function testAddBasketServices() |
162 | 162 | { |
163 | - $basket = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->createItem(); |
|
164 | - $manager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base/service' ); |
|
163 | + $basket = \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->createItem(); |
|
164 | + $manager = \Aimeos\MShop\Factory::createManager($this->context, 'order/base/service'); |
|
165 | 165 | |
166 | 166 | $orderServices = [ |
167 | - 'delivery' => [$manager->createItem()->setCode( 'shiptest' )], |
|
168 | - 'payment' => [$manager->createItem()->setCode( 'paytest' )], |
|
167 | + 'delivery' => [$manager->createItem()->setCode('shiptest')], |
|
168 | + 'payment' => [$manager->createItem()->setCode('paytest')], |
|
169 | 169 | ]; |
170 | 170 | |
171 | - $basket = $this->access( 'addBasketServices' )->invokeArgs( $this->object, [$this->context, $basket, $orderServices] ); |
|
171 | + $basket = $this->access('addBasketServices')->invokeArgs($this->object, [$this->context, $basket, $orderServices]); |
|
172 | 172 | |
173 | 173 | $class = \Aimeos\MShop\Order\Item\Base\Service\Iface::class; |
174 | 174 | |
175 | - $this->assertEquals( 2, count( $basket->getServices() ) ); |
|
176 | - $this->assertEquals( 1, count( $basket->getService( 'delivery' ) ) ); |
|
177 | - $this->assertInstanceOf( $class, $basket->getService( 'delivery', 'unitcode' ) ); |
|
178 | - $this->assertEquals( 1, count( $basket->getService( 'payment' ) ) ); |
|
179 | - $this->assertInstanceOf( $class, $basket->getService( 'payment', 'paytest' ) ); |
|
175 | + $this->assertEquals(2, count($basket->getServices())); |
|
176 | + $this->assertEquals(1, count($basket->getService('delivery'))); |
|
177 | + $this->assertInstanceOf($class, $basket->getService('delivery', 'unitcode')); |
|
178 | + $this->assertEquals(1, count($basket->getService('payment'))); |
|
179 | + $this->assertInstanceOf($class, $basket->getService('payment', 'paytest')); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | |
@@ -184,34 +184,34 @@ discard block |
||
184 | 184 | { |
185 | 185 | $item = $this->getSubscription(); |
186 | 186 | |
187 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Base\\Standard' ) |
|
188 | - ->setConstructorArgs( [$this->context] ) |
|
189 | - ->setMethods( ['store'] ) |
|
187 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Base\\Standard') |
|
188 | + ->setConstructorArgs([$this->context]) |
|
189 | + ->setMethods(['store']) |
|
190 | 190 | ->getMock(); |
191 | 191 | |
192 | - \Aimeos\MShop\Factory::injectManager( $this->context, 'order/base', $managerStub ); |
|
192 | + \Aimeos\MShop\Factory::injectManager($this->context, 'order/base', $managerStub); |
|
193 | 193 | |
194 | - $managerStub->expects( $this->once() )->method( 'store' ); |
|
194 | + $managerStub->expects($this->once())->method('store'); |
|
195 | 195 | |
196 | - $this->access( 'createOrderBase' )->invokeArgs( $this->object, [$this->context, $item] ); |
|
196 | + $this->access('createOrderBase')->invokeArgs($this->object, [$this->context, $item]); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | |
200 | 200 | public function testCreateOrderInvoice() |
201 | 201 | { |
202 | 202 | $item = $this->getSubscription(); |
203 | - $baseItem = $this->getOrderBaseItem( $item->getOrderBaseId() ); |
|
203 | + $baseItem = $this->getOrderBaseItem($item->getOrderBaseId()); |
|
204 | 204 | |
205 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
206 | - ->setConstructorArgs( [$this->context] ) |
|
207 | - ->setMethods( ['saveItem'] ) |
|
205 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
206 | + ->setConstructorArgs([$this->context]) |
|
207 | + ->setMethods(['saveItem']) |
|
208 | 208 | ->getMock(); |
209 | 209 | |
210 | - \Aimeos\MShop\Factory::injectManager( $this->context, 'order', $managerStub ); |
|
210 | + \Aimeos\MShop\Factory::injectManager($this->context, 'order', $managerStub); |
|
211 | 211 | |
212 | - $managerStub->expects( $this->once() )->method( 'saveItem' ); |
|
212 | + $managerStub->expects($this->once())->method('saveItem'); |
|
213 | 213 | |
214 | - $this->access( 'createOrderInvoice' )->invokeArgs( $this->object, [$this->context, $baseItem] ); |
|
214 | + $this->access('createOrderInvoice')->invokeArgs($this->object, [$this->context, $baseItem]); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | |
@@ -219,55 +219,55 @@ discard block |
||
219 | 219 | { |
220 | 220 | $item = $this->getSubscription(); |
221 | 221 | $invoice = $this->getOrderItem(); |
222 | - $baseItem = $this->getOrderBaseItem( $item->getOrderBaseId() ); |
|
222 | + $baseItem = $this->getOrderBaseItem($item->getOrderBaseId()); |
|
223 | 223 | |
224 | - $managerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
225 | - ->setConstructorArgs( [$this->context] ) |
|
226 | - ->setMethods( ['saveItem'] ) |
|
224 | + $managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
225 | + ->setConstructorArgs([$this->context]) |
|
226 | + ->setMethods(['saveItem']) |
|
227 | 227 | ->getMock(); |
228 | 228 | |
229 | - \Aimeos\MShop\Factory::injectManager( $this->context, 'order', $managerStub ); |
|
229 | + \Aimeos\MShop\Factory::injectManager($this->context, 'order', $managerStub); |
|
230 | 230 | |
231 | - $managerStub->expects( $this->once() )->method( 'saveItem' ); |
|
231 | + $managerStub->expects($this->once())->method('saveItem'); |
|
232 | 232 | |
233 | - $this->access( 'createPayment' )->invokeArgs( $this->object, [$this->context, $baseItem, $invoice] ); |
|
233 | + $this->access('createPayment')->invokeArgs($this->object, [$this->context, $baseItem, $invoice]); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | |
237 | 237 | protected function getOrderItem() |
238 | 238 | { |
239 | - return \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem(); |
|
239 | + return \Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem(); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | |
243 | - protected function getOrderBaseItem( $baseId ) |
|
243 | + protected function getOrderBaseItem($baseId) |
|
244 | 244 | { |
245 | - return \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' )->getItem( $baseId, ['order/base/service'] ); |
|
245 | + return \Aimeos\MShop\Factory::createManager($this->context, 'order/base')->getItem($baseId, ['order/base/service']); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | |
249 | 249 | protected function getSubscription() |
250 | 250 | { |
251 | - $manager = \Aimeos\MShop\Factory::createManager( $this->context, 'subscription' ); |
|
251 | + $manager = \Aimeos\MShop\Factory::createManager($this->context, 'subscription'); |
|
252 | 252 | |
253 | 253 | $search = $manager->createSearch(); |
254 | - $search->setConditions( $search->compare( '==', 'subscription.dateend', '2010-01-01' ) ); |
|
254 | + $search->setConditions($search->compare('==', 'subscription.dateend', '2010-01-01')); |
|
255 | 255 | |
256 | - $items = $manager->searchItems( $search ); |
|
256 | + $items = $manager->searchItems($search); |
|
257 | 257 | |
258 | - if( ( $item = reset( $items ) ) !== false ) { |
|
258 | + if (($item = reset($items)) !== false) { |
|
259 | 259 | return $item; |
260 | 260 | } |
261 | 261 | |
262 | - throw new \Exception( 'No subscription item found' ); |
|
262 | + throw new \Exception('No subscription item found'); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | |
266 | - protected function access( $name ) |
|
266 | + protected function access($name) |
|
267 | 267 | { |
268 | - $class = new \ReflectionClass( \Aimeos\Controller\Jobs\Subscription\Process\Renew\Standard::class ); |
|
269 | - $method = $class->getMethod( $name ); |
|
270 | - $method->setAccessible( true ); |
|
268 | + $class = new \ReflectionClass(\Aimeos\Controller\Jobs\Subscription\Process\Renew\Standard::class); |
|
269 | + $method = $class->getMethod($name); |
|
270 | + $method->setAccessible(true); |
|
271 | 271 | |
272 | 272 | return $method; |
273 | 273 | } |