Completed
Push — master ( 1ad2fa...984043 )
by Aimeos
07:51
created
src/Controller/Common/Order/Export/Csv/Processor/Product/Standard.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,20 +40,20 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Controller/Common/Order/Export/Csv/Processor/Service/Standard.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,25 +40,25 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Product/Export/Sitemap/Standard.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
jobs/tests/Controller/Jobs/Order/Service/Delivery/StandardTest.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		$context = \TestHelperJobs::getContext();
21 21
 		$aimeos = \TestHelperJobs::getAimeos();
22 22
 
23
-		$this->object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos );
23
+		$this->object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos);
24 24
 	}
25 25
 
26 26
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function testGetName()
34 34
 	{
35
-		$this->assertEquals( 'Process order delivery services', $this->object->getName() );
35
+		$this->assertEquals('Process order delivery services', $this->object->getName());
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testGetDescription()
40 40
 	{
41 41
 		$text = 'Sends paid orders to the ERP system or logistic partner';
42
-		$this->assertEquals( $text, $this->object->getDescription() );
42
+		$this->assertEquals($text, $this->object->getDescription());
43 43
 	}
44 44
 
45 45
 
@@ -50,47 +50,47 @@  discard block
 block discarded – undo
50 50
 
51 51
 
52 52
 		$name = 'ControllerJobsServiceDeliveryProcessDefaultRun';
53
-		$context->getConfig()->set( 'mshop/service/manager/name', $name );
54
-		$context->getConfig()->set( 'mshop/order/manager/name', $name );
53
+		$context->getConfig()->set('mshop/service/manager/name', $name);
54
+		$context->getConfig()->set('mshop/order/manager/name', $name);
55 55
 
56 56
 
57
-		$serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
58
-			->setMethods( array( 'getProvider', 'searchItems' ) )
59
-			->setConstructorArgs( array( $context ) )
57
+		$serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
58
+			->setMethods(array('getProvider', 'searchItems'))
59
+			->setConstructorArgs(array($context))
60 60
 			->getMock();
61 61
 
62
-		$orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' )
63
-			->setMethods( array( 'saveItems', 'searchItems' ) )
64
-			->setConstructorArgs( array( $context ) )
62
+		$orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard')
63
+			->setMethods(array('saveItems', 'searchItems'))
64
+			->setConstructorArgs(array($context))
65 65
 			->getMock();
66 66
 
67
-		\Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub );
68
-		\Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub );
67
+		\Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub);
68
+		\Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub);
69 69
 
70 70
 
71 71
 		$serviceItem = $serviceManagerStub->createItem();
72 72
 		$orderItem = $orderManagerStub->createItem();
73 73
 
74
-		$serviceProviderStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' )
75
-			->setConstructorArgs( array( $context, $serviceItem ) )
74
+		$serviceProviderStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard')
75
+			->setConstructorArgs(array($context, $serviceItem))
76 76
 			->getMock();
77 77
 
78 78
 
79
-		$serviceManagerStub->expects( $this->once() )->method( 'searchItems' )
80
-			->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) );
79
+		$serviceManagerStub->expects($this->once())->method('searchItems')
80
+			->will($this->onConsecutiveCalls(array($serviceItem), []));
81 81
 
82
-		$serviceManagerStub->expects( $this->once() )->method( 'getProvider' )
83
-			->will( $this->returnValue( $serviceProviderStub ) );
82
+		$serviceManagerStub->expects($this->once())->method('getProvider')
83
+			->will($this->returnValue($serviceProviderStub));
84 84
 
85
-		$orderManagerStub->expects( $this->once() )->method( 'searchItems' )
86
-			->will( $this->onConsecutiveCalls( array( $orderItem ), [] ) );
85
+		$orderManagerStub->expects($this->once())->method('searchItems')
86
+			->will($this->onConsecutiveCalls(array($orderItem), []));
87 87
 
88
-		$serviceProviderStub->expects( $this->once() )->method( 'processBatch' );
88
+		$serviceProviderStub->expects($this->once())->method('processBatch');
89 89
 
90
-		$orderManagerStub->expects( $this->once() )->method( 'saveItems' );
90
+		$orderManagerStub->expects($this->once())->method('saveItems');
91 91
 
92 92
 
93
-		$object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos );
93
+		$object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos);
94 94
 		$object->run();
95 95
 	}
96 96
 
@@ -102,48 +102,48 @@  discard block
 block discarded – undo
102 102
 
103 103
 
104 104
 		$name = 'ControllerJobsServiceDeliveryProcessDefaultRun';
105
-		$context->getConfig()->set( 'mshop/service/manager/name', $name );
106
-		$context->getConfig()->set( 'mshop/order/manager/name', $name );
105
+		$context->getConfig()->set('mshop/service/manager/name', $name);
106
+		$context->getConfig()->set('mshop/order/manager/name', $name);
107 107
 
108 108
 
109
-		$orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' )
110
-			->setMethods( array( 'saveItems', 'searchItems' ) )
111
-			->setConstructorArgs( array( $context ) )
109
+		$orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard')
110
+			->setMethods(array('saveItems', 'searchItems'))
111
+			->setConstructorArgs(array($context))
112 112
 			->getMock();
113 113
 
114
-		$serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
115
-			->setMethods( array( 'getProvider', 'searchItems' ) )
116
-			->setConstructorArgs( array( $context ) )
114
+		$serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
115
+			->setMethods(array('getProvider', 'searchItems'))
116
+			->setConstructorArgs(array($context))
117 117
 			->getMock();
118 118
 
119
-		\Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub );
120
-		\Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub );
119
+		\Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub);
120
+		\Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub);
121 121
 
122 122
 
123 123
 		$serviceItem = $serviceManagerStub->createItem();
124 124
 		$orderItem = $orderManagerStub->createItem();
125 125
 
126
-		$serviceProviderStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' )
127
-			->setConstructorArgs( array( $context, $serviceItem ) )
126
+		$serviceProviderStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard')
127
+			->setConstructorArgs(array($context, $serviceItem))
128 128
 			->getMock();
129 129
 
130 130
 
131
-		$serviceManagerStub->expects( $this->once() )->method( 'searchItems' )
132
-			->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) );
131
+		$serviceManagerStub->expects($this->once())->method('searchItems')
132
+			->will($this->onConsecutiveCalls(array($serviceItem), []));
133 133
 
134
-		$serviceManagerStub->expects( $this->once() )->method( 'getProvider' )
135
-			->will( $this->returnValue( $serviceProviderStub ) );
134
+		$serviceManagerStub->expects($this->once())->method('getProvider')
135
+			->will($this->returnValue($serviceProviderStub));
136 136
 
137
-		$orderManagerStub->expects( $this->once() )->method( 'searchItems' )
138
-			->will( $this->onConsecutiveCalls( array( $orderItem ), [] ) );
137
+		$orderManagerStub->expects($this->once())->method('searchItems')
138
+			->will($this->onConsecutiveCalls(array($orderItem), []));
139 139
 
140
-		$serviceProviderStub->expects( $this->once() )->method( 'processBatch' )
141
-			->will( $this->throwException( new \Aimeos\MShop\Service\Exception( 'test order service delivery: process' ) ) );
140
+		$serviceProviderStub->expects($this->once())->method('processBatch')
141
+			->will($this->throwException(new \Aimeos\MShop\Service\Exception('test order service delivery: process')));
142 142
 
143
-		$orderManagerStub->expects( $this->never() )->method( 'saveItems' );
143
+		$orderManagerStub->expects($this->never())->method('saveItems');
144 144
 
145 145
 
146
-		$object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos );
146
+		$object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos);
147 147
 		$object->run();
148 148
 	}
149 149
 
@@ -155,36 +155,36 @@  discard block
 block discarded – undo
155 155
 
156 156
 
157 157
 		$name = 'ControllerJobsServiceDeliveryProcessDefaultRun';
158
-		$context->getConfig()->set( 'mshop/service/manager/name', $name );
159
-		$context->getConfig()->set( 'mshop/order/manager/name', $name );
158
+		$context->getConfig()->set('mshop/service/manager/name', $name);
159
+		$context->getConfig()->set('mshop/order/manager/name', $name);
160 160
 
161 161
 
162
-		$orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' )
163
-			->setMethods( array( 'saveItem', 'searchItems' ) )
164
-			->setConstructorArgs( array( $context ) )
162
+		$orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard')
163
+			->setMethods(array('saveItem', 'searchItems'))
164
+			->setConstructorArgs(array($context))
165 165
 			->getMock();
166 166
 
167
-		$serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
168
-			->setMethods( array( 'getProvider', 'searchItems' ) )
169
-			->setConstructorArgs( array( $context ) )
167
+		$serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
168
+			->setMethods(array('getProvider', 'searchItems'))
169
+			->setConstructorArgs(array($context))
170 170
 			->getMock();
171 171
 
172
-		\Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub );
173
-		\Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub );
172
+		\Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub);
173
+		\Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub);
174 174
 
175 175
 
176 176
 		$serviceItem = $serviceManagerStub->createItem();
177 177
 
178
-		$serviceManagerStub->expects( $this->once() )->method( 'searchItems' )
179
-			->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) );
178
+		$serviceManagerStub->expects($this->once())->method('searchItems')
179
+			->will($this->onConsecutiveCalls(array($serviceItem), []));
180 180
 
181
-		$serviceManagerStub->expects( $this->once() )->method( 'getProvider' )
182
-			->will( $this->throwException( new \Aimeos\MShop\Service\Exception( 'test sorder service delivery: getProvider' ) ) );
181
+		$serviceManagerStub->expects($this->once())->method('getProvider')
182
+			->will($this->throwException(new \Aimeos\MShop\Service\Exception('test sorder service delivery: getProvider')));
183 183
 
184
-		$orderManagerStub->expects( $this->never() )->method( 'searchItems' );
184
+		$orderManagerStub->expects($this->never())->method('searchItems');
185 185
 
186 186
 
187
-		$object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos );
187
+		$object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos);
188 188
 		$object->run();
189 189
 	}
190 190
 }
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Order/Service/Async/StandardTest.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		$context = \TestHelperJobs::getContext();
21 21
 		$aimeos = \TestHelperJobs::getAimeos();
22 22
 
23
-		$this->object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard( $context, $aimeos );
23
+		$this->object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos);
24 24
 	}
25 25
 
26 26
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function testGetName()
34 34
 	{
35
-		$this->assertEquals( 'Batch update of payment/delivery status', $this->object->getName() );
35
+		$this->assertEquals('Batch update of payment/delivery status', $this->object->getName());
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testGetDescription()
40 40
 	{
41 41
 		$text = 'Executes payment or delivery service providers that uses batch updates';
42
-		$this->assertEquals( $text, $this->object->getDescription() );
42
+		$this->assertEquals($text, $this->object->getDescription());
43 43
 	}
44 44
 
45 45
 
@@ -50,34 +50,34 @@  discard block
 block discarded – undo
50 50
 
51 51
 
52 52
 		$name = 'ControllerJobsServiceAsyncProcessDefaultRun';
53
-		$context->getConfig()->set( 'mshop/service/manager/name', $name );
53
+		$context->getConfig()->set('mshop/service/manager/name', $name);
54 54
 
55 55
 
56
-		$serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
57
-			->setMethods( array( 'getProvider', 'searchItems' ) )
58
-			->setConstructorArgs( array( $context ) )
56
+		$serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
57
+			->setMethods(array('getProvider', 'searchItems'))
58
+			->setConstructorArgs(array($context))
59 59
 			->getMock();
60 60
 
61
-		\Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub );
61
+		\Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub);
62 62
 
63 63
 
64 64
 		$serviceItem = $serviceManagerStub->createItem();
65 65
 
66
-		$serviceProviderStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' )
67
-			->setConstructorArgs( array( $context, $serviceItem ) )
66
+		$serviceProviderStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard')
67
+			->setConstructorArgs(array($context, $serviceItem))
68 68
 			->getMock();
69 69
 
70 70
 
71
-		$serviceManagerStub->expects( $this->once() )->method( 'searchItems' )
72
-			->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) );
71
+		$serviceManagerStub->expects($this->once())->method('searchItems')
72
+			->will($this->onConsecutiveCalls(array($serviceItem), []));
73 73
 
74
-		$serviceManagerStub->expects( $this->once() )->method( 'getProvider' )
75
-			->will( $this->returnValue( $serviceProviderStub ) );
74
+		$serviceManagerStub->expects($this->once())->method('getProvider')
75
+			->will($this->returnValue($serviceProviderStub));
76 76
 
77
-		$serviceProviderStub->expects( $this->once() )->method( 'updateAsync' );
77
+		$serviceProviderStub->expects($this->once())->method('updateAsync');
78 78
 
79 79
 
80
-		$object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard( $context, $aimeos );
80
+		$object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos);
81 81
 		$object->run();
82 82
 	}
83 83
 
@@ -89,27 +89,27 @@  discard block
 block discarded – undo
89 89
 
90 90
 
91 91
 		$name = 'ControllerJobsServiceAsyncProcessDefaultRun';
92
-		$context->getConfig()->set( 'mshop/service/manager/name', $name );
92
+		$context->getConfig()->set('mshop/service/manager/name', $name);
93 93
 
94 94
 
95
-		$serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' )
96
-			->setMethods( array( 'getProvider', 'searchItems' ) )
97
-			->setConstructorArgs( array( $context ) )
95
+		$serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')
96
+			->setMethods(array('getProvider', 'searchItems'))
97
+			->setConstructorArgs(array($context))
98 98
 			->getMock();
99 99
 
100
-		\Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub );
100
+		\Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub);
101 101
 
102 102
 
103 103
 		$serviceItem = $serviceManagerStub->createItem();
104 104
 
105
-		$serviceManagerStub->expects( $this->once() )->method( 'searchItems' )
106
-			->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) );
105
+		$serviceManagerStub->expects($this->once())->method('searchItems')
106
+			->will($this->onConsecutiveCalls(array($serviceItem), []));
107 107
 
108
-		$serviceManagerStub->expects( $this->once() )->method( 'getProvider' )
109
-			->will( $this->throwException( new \Aimeos\MShop\Service\Exception() ) );
108
+		$serviceManagerStub->expects($this->once())->method('getProvider')
109
+			->will($this->throwException(new \Aimeos\MShop\Service\Exception()));
110 110
 
111 111
 
112
-		$object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard( $context, $aimeos );
112
+		$object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos);
113 113
 		$object->run();
114 114
 	}
115 115
 }
Please login to merge, or discard this patch.
tests/Controller/Common/Order/Export/Csv/Processor/Invoice/StandardTest.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -34,50 +34,50 @@
 block discarded – undo
34 34
 		);
35 35
 
36 36
 
37
-		$object = new \Aimeos\Controller\Common\Order\Export\Csv\Processor\Invoice\Standard( $context, $mapping );
38
-
39
-		$invoice = $this->getInvoice( $context );
40
-		$order = \Aimeos\MShop\Factory::createManager( $context, 'order/base' )->load( $invoice->getBaseId() );
41
-
42
-		$data = $object->process( $invoice, $order );
43
-
44
-
45
-		$this->assertEquals( 1, count( $data ) );
46
-
47
-		$this->assertEquals( 17, count( $data[0] ) );
48
-		$this->assertEquals( 'web', $data[0][0] );
49
-		$this->assertEquals( '2008-02-15 12:34:56', $data[0][1] );
50
-		$this->assertEquals( '6', $data[0][2] );
51
-		$this->assertEquals( '', $data[0][3] );
52
-		$this->assertEquals( '4', $data[0][4] );
53
-		$this->assertEquals( '', $data[0][5] );
54
-		$this->assertGreaterThan( 0, $data[0][6] );
55
-		$this->assertEquals( 'unittest', $data[0][7] );
56
-		$this->assertEquals( 'de', $data[0][8] );
57
-		$this->assertEquals( 'EUR', $data[0][9] );
58
-		$this->assertEquals( '53.50', $data[0][10] );
59
-		$this->assertEquals( '1.50', $data[0][11] );
60
-		$this->assertEquals( '14.50', $data[0][12] );
61
-		$this->assertEquals( '0.0000', $data[0][13] );
62
-		$this->assertEquals( '1', $data[0][14] );
63
-		$this->assertEquals( '1', $data[0][15] );
64
-		$this->assertEquals( 'This is a comment if an order. It can be added by the user.', $data[0][16] );
37
+		$object = new \Aimeos\Controller\Common\Order\Export\Csv\Processor\Invoice\Standard($context, $mapping);
38
+
39
+		$invoice = $this->getInvoice($context);
40
+		$order = \Aimeos\MShop\Factory::createManager($context, 'order/base')->load($invoice->getBaseId());
41
+
42
+		$data = $object->process($invoice, $order);
43
+
44
+
45
+		$this->assertEquals(1, count($data));
46
+
47
+		$this->assertEquals(17, count($data[0]));
48
+		$this->assertEquals('web', $data[0][0]);
49
+		$this->assertEquals('2008-02-15 12:34:56', $data[0][1]);
50
+		$this->assertEquals('6', $data[0][2]);
51
+		$this->assertEquals('', $data[0][3]);
52
+		$this->assertEquals('4', $data[0][4]);
53
+		$this->assertEquals('', $data[0][5]);
54
+		$this->assertGreaterThan(0, $data[0][6]);
55
+		$this->assertEquals('unittest', $data[0][7]);
56
+		$this->assertEquals('de', $data[0][8]);
57
+		$this->assertEquals('EUR', $data[0][9]);
58
+		$this->assertEquals('53.50', $data[0][10]);
59
+		$this->assertEquals('1.50', $data[0][11]);
60
+		$this->assertEquals('14.50', $data[0][12]);
61
+		$this->assertEquals('0.0000', $data[0][13]);
62
+		$this->assertEquals('1', $data[0][14]);
63
+		$this->assertEquals('1', $data[0][15]);
64
+		$this->assertEquals('This is a comment if an order. It can be added by the user.', $data[0][16]);
65 65
 	}
66 66
 
67 67
 
68
-	protected function getInvoice( $context )
68
+	protected function getInvoice($context)
69 69
 	{
70
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'order' );
70
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'order');
71 71
 
72 72
 		$search = $manager->createSearch();
73
-		$search->setConditions( $search->compare( '==', 'order.datepayment', '2008-02-15 12:34:56' ) );
73
+		$search->setConditions($search->compare('==', 'order.datepayment', '2008-02-15 12:34:56'));
74 74
 
75
-		$items = $manager->searchItems( $search );
75
+		$items = $manager->searchItems($search);
76 76
 
77
-		if( ( $item = reset( $items ) ) !== false ) {
77
+		if (($item = reset($items)) !== false) {
78 78
 			return $item;
79 79
 		}
80 80
 
81
-		throw new \Exception( 'No order item found' );
81
+		throw new \Exception('No order item found');
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
controller/jobs/templates/product/export/items-body-standard.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
 
10 10
 ?>
11 11
 <productlist>
12
-    <?php foreach( $this->get( 'exportItems', [] ) as $id => $item ) : ?>
12
+    <?php foreach ($this->get('exportItems', []) as $id => $item) : ?>
13 13
 
14
-        <product-content id="<?php echo $enc->attr( $id ); ?>" >
15
-            <productitem id="<?php echo $enc->attr( $id ); ?>" siteid="<?php echo $enc->attr( $item->getSiteId() ); ?>" typeid="<?php echo $enc->attr( $item->getTypeId() ); ?>" ctime="<?php echo $enc->attr( $item->getTimeCreated() ); ?>" mtime="<?php echo $enc->attr( $item->getTimeModified() ); ?>" editor="<?php echo $enc->attr( $item->getEditor() ); ?>">
14
+        <product-content id="<?php echo $enc->attr($id); ?>" >
15
+            <productitem id="<?php echo $enc->attr($id); ?>" siteid="<?php echo $enc->attr($item->getSiteId()); ?>" typeid="<?php echo $enc->attr($item->getTypeId()); ?>" ctime="<?php echo $enc->attr($item->getTimeCreated()); ?>" mtime="<?php echo $enc->attr($item->getTimeModified()); ?>" editor="<?php echo $enc->attr($item->getEditor()); ?>">
16 16
                 <type><![CDATA[<?php echo $item->getType(); ?>]]></type>
17 17
                 <code><![CDATA[<?php echo $item->getCode(); ?>]]></code>
18 18
                 <label><![CDATA[<?php echo $item->getCode(); ?>]]></label>
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
             </productitem>
23 23
             <list>
24 24
                 <text>
25
-                    <?php foreach( $item->getListItems( 'text' ) as $listItem ) : ?>
25
+                    <?php foreach ($item->getListItems('text') as $listItem) : ?>
26 26
                         <?php if ($refItem = $listItem->getRefItem()) { ?>
27 27
 
28
-                            <textitem id="<?php echo $enc->attr( $refItem->getId() ); ?>" siteid="<?php echo $enc->attr( $refItem->getSiteId() ); ?>" typeid="<?php echo $enc->attr( $refItem->getTypeId() ); ?>" ctime="<?php echo $enc->attr( $refItem->getTimeCreated() ); ?>" mtime="<?php echo $enc->attr( $refItem->getTimeModified() ); ?>" editor="<?php echo $enc->attr( $refItem->getEditor() ); ?>" list.id="<?php echo $enc->attr( $listItem->getId() ); ?>" list.siteid="<?php echo $enc->attr( $listItem->getSiteId() ); ?>" list.parentid="<?php echo $enc->attr( $listItem->getParentId() ); ?>" list.typeid="<?php echo $enc->attr( $listItem->getTypeId() ); ?>" list.type="<?php echo $enc->attr( $listItem->getType() ); ?>" list.domain="<?php echo $enc->attr( $listItem->getDomain() ); ?>" list.config="<?php echo $enc->attr( json_encode( $listItem->getConfig() ) ); ?>" list.start="<?php echo $enc->attr( $listItem->getDateStart() ); ?>" list.end="<?php echo $enc->attr( $listItem->getDateEnd() ); ?>" list.position="<?php echo $enc->attr( $listItem->getPosition() ); ?>" list.status="<?php echo $enc->attr( $listItem->getStatus() ); ?>" list.ctime="<?php echo $enc->attr( $listItem->getTimeCreated() ); ?>" list.mtime="<?php echo $enc->attr( $listItem->getTimeModified() ); ?>" list.editor="<?php echo $enc->attr( $listItem->getEditor() ); ?>">
28
+                            <textitem id="<?php echo $enc->attr($refItem->getId()); ?>" siteid="<?php echo $enc->attr($refItem->getSiteId()); ?>" typeid="<?php echo $enc->attr($refItem->getTypeId()); ?>" ctime="<?php echo $enc->attr($refItem->getTimeCreated()); ?>" mtime="<?php echo $enc->attr($refItem->getTimeModified()); ?>" editor="<?php echo $enc->attr($refItem->getEditor()); ?>" list.id="<?php echo $enc->attr($listItem->getId()); ?>" list.siteid="<?php echo $enc->attr($listItem->getSiteId()); ?>" list.parentid="<?php echo $enc->attr($listItem->getParentId()); ?>" list.typeid="<?php echo $enc->attr($listItem->getTypeId()); ?>" list.type="<?php echo $enc->attr($listItem->getType()); ?>" list.domain="<?php echo $enc->attr($listItem->getDomain()); ?>" list.config="<?php echo $enc->attr(json_encode($listItem->getConfig())); ?>" list.start="<?php echo $enc->attr($listItem->getDateStart()); ?>" list.end="<?php echo $enc->attr($listItem->getDateEnd()); ?>" list.position="<?php echo $enc->attr($listItem->getPosition()); ?>" list.status="<?php echo $enc->attr($listItem->getStatus()); ?>" list.ctime="<?php echo $enc->attr($listItem->getTimeCreated()); ?>" list.mtime="<?php echo $enc->attr($listItem->getTimeModified()); ?>" list.editor="<?php echo $enc->attr($listItem->getEditor()); ?>">
29 29
                                 <type><![CDATA[<?php echo $refItem->getType(); ?>]]></type>
30 30
                                 <languageid><![CDATA[<?php echo $refItem->getLanguageId(); ?>]]></languageid>
31 31
                                 <label><![CDATA[<?php echo $refItem->getLabel(); ?>]]></label>
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 
38 38
                 </text>
39 39
                 <media>
40
-                    <?php foreach( $item->getListItems( 'media' ) as $listItem ) : ?>
40
+                    <?php foreach ($item->getListItems('media') as $listItem) : ?>
41 41
                         <?php if ($refItem = $listItem->getRefItem()) { ?>
42 42
 
43
-                            <mediaitem id="<?php echo $enc->attr( $refItem->getId() ); ?>" siteid="<?php echo $enc->attr( $refItem->getSiteId() ); ?>" typeid="<?php echo $enc->attr( $refItem->getTypeId() ); ?>" ctime="<?php echo $enc->attr( $refItem->getTimeCreated() ); ?>" mtime="<?php echo $enc->attr( $refItem->getTimeModified() ); ?>" editor="<?php echo $enc->attr( $refItem->getEditor() ); ?>" list.id="<?php echo $enc->attr( $listItem->getId() ); ?>" list.siteid="<?php echo $enc->attr( $listItem->getSiteId() ); ?>" list.parentid="<?php echo $enc->attr( $listItem->getParentId() ); ?>" list.typeid="<?php echo $enc->attr( $listItem->getTypeId() ); ?>" list.type="<?php echo $enc->attr( $listItem->getType() ); ?>" list.config="<?php echo $enc->attr( json_encode( $listItem->getConfig() ) ); ?>" list.start="<?php echo $enc->attr( $listItem->getDateStart() ); ?>" list.end="<?php echo $enc->attr( $listItem->getDateEnd() ); ?>" list.position="<?php echo $enc->attr( $listItem->getPosition() ); ?>" list.status="<?php echo $enc->attr( $listItem->getStatus() ); ?>" list.ctime="<?php echo $enc->attr( $listItem->getTimeCreated() ); ?>" list.mtime="<?php echo $enc->attr( $listItem->getTimeModified() ); ?>" list.editor="<?php echo $enc->attr( $listItem->getEditor() ); ?>">
43
+                            <mediaitem id="<?php echo $enc->attr($refItem->getId()); ?>" siteid="<?php echo $enc->attr($refItem->getSiteId()); ?>" typeid="<?php echo $enc->attr($refItem->getTypeId()); ?>" ctime="<?php echo $enc->attr($refItem->getTimeCreated()); ?>" mtime="<?php echo $enc->attr($refItem->getTimeModified()); ?>" editor="<?php echo $enc->attr($refItem->getEditor()); ?>" list.id="<?php echo $enc->attr($listItem->getId()); ?>" list.siteid="<?php echo $enc->attr($listItem->getSiteId()); ?>" list.parentid="<?php echo $enc->attr($listItem->getParentId()); ?>" list.typeid="<?php echo $enc->attr($listItem->getTypeId()); ?>" list.type="<?php echo $enc->attr($listItem->getType()); ?>" list.config="<?php echo $enc->attr(json_encode($listItem->getConfig())); ?>" list.start="<?php echo $enc->attr($listItem->getDateStart()); ?>" list.end="<?php echo $enc->attr($listItem->getDateEnd()); ?>" list.position="<?php echo $enc->attr($listItem->getPosition()); ?>" list.status="<?php echo $enc->attr($listItem->getStatus()); ?>" list.ctime="<?php echo $enc->attr($listItem->getTimeCreated()); ?>" list.mtime="<?php echo $enc->attr($listItem->getTimeModified()); ?>" list.editor="<?php echo $enc->attr($listItem->getEditor()); ?>">
44 44
                                 <type><![CDATA[<?php echo $refItem->getType(); ?>]]></type>
45 45
                                 <languageid><![CDATA[<?php echo $refItem->getLanguageId(); ?>]]></languageid>
46 46
                                 <label><![CDATA[<?php echo $refItem->getLabel(); ?>]]></label>
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 
55 55
                 </media>
56 56
                 <price>
57
-                    <?php foreach( $item->getListItems( 'price' ) as $listItem ) : ?>
57
+                    <?php foreach ($item->getListItems('price') as $listItem) : ?>
58 58
                         <?php if ($refItem = $listItem->getRefItem()) { ?>
59 59
 
60
-                            <priceitem id="<?php echo $enc->attr( $refItem->getId() ); ?>" siteid="<?php echo $enc->attr( $refItem->getSiteId() ); ?>" typeid="<?php echo $enc->attr( $refItem->getTypeId() ); ?>" ctime="<?php echo $enc->attr( $refItem->getTimeCreated() ); ?>" mtime="<?php echo $enc->attr( $refItem->getTimeModified() ); ?>" editor="<?php echo $enc->attr( $refItem->getEditor() ); ?>" list.id="<?php echo $enc->attr( $listItem->getId() ); ?>" list.siteid="<?php echo $enc->attr( $listItem->getSiteId() ); ?>" list.parentid="<?php echo $enc->attr( $listItem->getParentId() ); ?>" list.typeid="<?php echo $enc->attr( $listItem->getTypeId() ); ?>" list.type="<?php echo $enc->attr( $listItem->getType() ); ?>" list.config="<?php echo $enc->attr( json_encode( $listItem->getConfig() ) ); ?>" list.start="<?php echo $enc->attr( $listItem->getDateStart() ); ?>" list.end="<?php echo $enc->attr( $listItem->getDateEnd() ); ?>" list.position="<?php echo $enc->attr( $listItem->getPosition() ); ?>" list.status="<?php echo $enc->attr( $listItem->getStatus() ); ?>" list.ctime="<?php echo $enc->attr( $listItem->getTimeCreated() ); ?>" list.mtime="<?php echo $enc->attr( $listItem->getTimeModified() ); ?>" list.editor="<?php echo $enc->attr( $listItem->getEditor() ); ?>">
60
+                            <priceitem id="<?php echo $enc->attr($refItem->getId()); ?>" siteid="<?php echo $enc->attr($refItem->getSiteId()); ?>" typeid="<?php echo $enc->attr($refItem->getTypeId()); ?>" ctime="<?php echo $enc->attr($refItem->getTimeCreated()); ?>" mtime="<?php echo $enc->attr($refItem->getTimeModified()); ?>" editor="<?php echo $enc->attr($refItem->getEditor()); ?>" list.id="<?php echo $enc->attr($listItem->getId()); ?>" list.siteid="<?php echo $enc->attr($listItem->getSiteId()); ?>" list.parentid="<?php echo $enc->attr($listItem->getParentId()); ?>" list.typeid="<?php echo $enc->attr($listItem->getTypeId()); ?>" list.type="<?php echo $enc->attr($listItem->getType()); ?>" list.config="<?php echo $enc->attr(json_encode($listItem->getConfig())); ?>" list.start="<?php echo $enc->attr($listItem->getDateStart()); ?>" list.end="<?php echo $enc->attr($listItem->getDateEnd()); ?>" list.position="<?php echo $enc->attr($listItem->getPosition()); ?>" list.status="<?php echo $enc->attr($listItem->getStatus()); ?>" list.ctime="<?php echo $enc->attr($listItem->getTimeCreated()); ?>" list.mtime="<?php echo $enc->attr($listItem->getTimeModified()); ?>" list.editor="<?php echo $enc->attr($listItem->getEditor()); ?>">
61 61
                                 <type><![CDATA[<?php echo $refItem->getType(); ?>]]></type>
62 62
                                 <currencyid><![CDATA[<?php echo $refItem->getCurrencyId(); ?>]]></currencyid>
63 63
                                 <quantity><![CDATA[<?php echo $refItem->getQuantity(); ?>]]></quantity>
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 
74 74
                 </price>
75 75
                 <attribute>
76
-                    <?php foreach( $item->getListItems( 'attribute' ) as $listItem ) : ?>
76
+                    <?php foreach ($item->getListItems('attribute') as $listItem) : ?>
77 77
                         <?php if ($refItem = $listItem->getRefItem()) { ?>
78 78
 
79
-                            <attributeitem id="<?php echo $enc->attr( $refItem->getId() ); ?>" siteid="<?php echo $enc->attr( $refItem->getSiteId() ); ?>" typeid="<?php echo $enc->attr( $refItem->getTypeId() ); ?>" ctime="<?php echo $enc->attr( $refItem->getTimeCreated() ); ?>" mtime="<?php echo $enc->attr( $refItem->getTimeModified() ); ?>" editor="<?php echo $enc->attr( $refItem->getEditor() ); ?>" list.id="<?php echo $enc->attr( $listItem->getId() ); ?>" list.siteid="<?php echo $enc->attr( $listItem->getSiteId() ); ?>" list.parentid="<?php echo $enc->attr( $listItem->getParentId() ); ?>" list.typeid="<?php echo $enc->attr( $listItem->getTypeId() ); ?>" list.type="<?php echo $enc->attr( $listItem->getType() ); ?>" list.config="<?php echo $enc->attr( json_encode( $listItem->getConfig() ) ); ?>" list.start="<?php echo $enc->attr( $listItem->getDateStart() ); ?>" list.end="<?php echo $enc->attr( $listItem->getDateEnd() ); ?>" list.position="<?php echo $enc->attr( $listItem->getPosition() ); ?>" list.status="<?php echo $enc->attr( $listItem->getStatus() ); ?>" list.ctime="<?php echo $enc->attr( $listItem->getTimeCreated() ); ?>" list.mtime="<?php echo $enc->attr( $listItem->getTimeModified() ); ?>" list.editor="<?php echo $enc->attr( $listItem->getEditor() ); ?>">
79
+                            <attributeitem id="<?php echo $enc->attr($refItem->getId()); ?>" siteid="<?php echo $enc->attr($refItem->getSiteId()); ?>" typeid="<?php echo $enc->attr($refItem->getTypeId()); ?>" ctime="<?php echo $enc->attr($refItem->getTimeCreated()); ?>" mtime="<?php echo $enc->attr($refItem->getTimeModified()); ?>" editor="<?php echo $enc->attr($refItem->getEditor()); ?>" list.id="<?php echo $enc->attr($listItem->getId()); ?>" list.siteid="<?php echo $enc->attr($listItem->getSiteId()); ?>" list.parentid="<?php echo $enc->attr($listItem->getParentId()); ?>" list.typeid="<?php echo $enc->attr($listItem->getTypeId()); ?>" list.type="<?php echo $enc->attr($listItem->getType()); ?>" list.config="<?php echo $enc->attr(json_encode($listItem->getConfig())); ?>" list.start="<?php echo $enc->attr($listItem->getDateStart()); ?>" list.end="<?php echo $enc->attr($listItem->getDateEnd()); ?>" list.position="<?php echo $enc->attr($listItem->getPosition()); ?>" list.status="<?php echo $enc->attr($listItem->getStatus()); ?>" list.ctime="<?php echo $enc->attr($listItem->getTimeCreated()); ?>" list.mtime="<?php echo $enc->attr($listItem->getTimeModified()); ?>" list.editor="<?php echo $enc->attr($listItem->getEditor()); ?>">
80 80
                                 <type><![CDATA[<?php echo $refItem->getType(); ?>]]></type>
81 81
                                 <code><![CDATA[<?php echo $refItem->getCode(); ?>]]></code>
82 82
                                 <label><![CDATA[<?php echo $refItem->getLabel(); ?>]]></label>
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
 
89 89
                 </attribute>
90 90
                 <product>
91
-                    <?php foreach( $item->getListItems( 'product' ) as $listItem ) : ?>
91
+                    <?php foreach ($item->getListItems('product') as $listItem) : ?>
92 92
                         <?php if ($refItem = $listItem->getRefItem()) { ?>
93 93
 
94
-                            <productitem id="<?php echo $enc->attr( $refItem->getId() ); ?>" siteid="<?php echo $enc->attr( $refItem->getSiteId() ); ?>" typeid="<?php echo $enc->attr( $refItem->getTypeId() ); ?>" ctime="<?php echo $enc->attr( $refItem->getTimeCreated() ); ?>" mtime="<?php echo $enc->attr( $refItem->getTimeModified() ); ?>" editor="<?php echo $enc->attr( $refItem->getEditor() ); ?>" list.id="<?php echo $enc->attr( $listItem->getId() ); ?>" list.siteid="<?php echo $enc->attr( $listItem->getSiteId() ); ?>" list.parentid="<?php echo $enc->attr( $listItem->getParentId() ); ?>" list.typeid="<?php echo $enc->attr( $listItem->getTypeId() ); ?>" list.type="<?php echo $enc->attr( $listItem->getType() ); ?>" list.config="<?php echo $enc->attr( json_encode( $listItem->getConfig() ) ); ?>" list.start="<?php echo $enc->attr( $listItem->getDateStart() ); ?>" list.end="<?php echo $enc->attr( $listItem->getDateEnd() ); ?>" list.position="<?php echo $enc->attr( $listItem->getPosition() ); ?>" list.status="<?php echo $enc->attr( $listItem->getStatus() ); ?>" list.ctime="<?php echo $enc->attr( $listItem->getTimeCreated() ); ?>" list.mtime="<?php echo $enc->attr( $listItem->getTimeModified() ); ?>" list.editor="<?php echo $enc->attr( $listItem->getEditor() ); ?>">
94
+                            <productitem id="<?php echo $enc->attr($refItem->getId()); ?>" siteid="<?php echo $enc->attr($refItem->getSiteId()); ?>" typeid="<?php echo $enc->attr($refItem->getTypeId()); ?>" ctime="<?php echo $enc->attr($refItem->getTimeCreated()); ?>" mtime="<?php echo $enc->attr($refItem->getTimeModified()); ?>" editor="<?php echo $enc->attr($refItem->getEditor()); ?>" list.id="<?php echo $enc->attr($listItem->getId()); ?>" list.siteid="<?php echo $enc->attr($listItem->getSiteId()); ?>" list.parentid="<?php echo $enc->attr($listItem->getParentId()); ?>" list.typeid="<?php echo $enc->attr($listItem->getTypeId()); ?>" list.type="<?php echo $enc->attr($listItem->getType()); ?>" list.config="<?php echo $enc->attr(json_encode($listItem->getConfig())); ?>" list.start="<?php echo $enc->attr($listItem->getDateStart()); ?>" list.end="<?php echo $enc->attr($listItem->getDateEnd()); ?>" list.position="<?php echo $enc->attr($listItem->getPosition()); ?>" list.status="<?php echo $enc->attr($listItem->getStatus()); ?>" list.ctime="<?php echo $enc->attr($listItem->getTimeCreated()); ?>" list.mtime="<?php echo $enc->attr($listItem->getTimeModified()); ?>" list.editor="<?php echo $enc->attr($listItem->getEditor()); ?>">
95 95
                                 <type><![CDATA[<?php echo $item->getType(); ?>]]></type>
96 96
                                 <code><![CDATA[<?php echo $item->getCode(); ?>]]></code>
97 97
                                 <label><![CDATA[<?php echo $item->getCode(); ?>]]></label>
Please login to merge, or discard this patch.
controller/jobs/templates/product/export/sitemap-items-body-standard.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@
 block discarded – undo
7 7
 
8 8
 $enc = $this->encoder();
9 9
 
10
-$detailTarget = $this->config( 'client/html/catalog/detail/url/target' );
11
-$detailCntl = $this->config( 'client/html/catalog/detail/url/controller', 'catalog' );
12
-$detailAction = $this->config( 'client/html/catalog/detail/url/action', 'detail' );
13
-$detailConfig = $this->config( 'client/html/catalog/detail/url/config', [] );
10
+$detailTarget = $this->config('client/html/catalog/detail/url/target');
11
+$detailCntl = $this->config('client/html/catalog/detail/url/controller', 'catalog');
12
+$detailAction = $this->config('client/html/catalog/detail/url/action', 'detail');
13
+$detailConfig = $this->config('client/html/catalog/detail/url/config', []);
14 14
 
15
-$freq = $enc->xml( $this->get( 'siteFreq', 'daily' ) );
15
+$freq = $enc->xml($this->get('siteFreq', 'daily'));
16 16
 
17 17
 ?>
18
-<?php foreach( $this->get( 'siteItems', [] ) as $id => $item ) : ?>
18
+<?php foreach ($this->get('siteItems', []) as $id => $item) : ?>
19 19
 <?php
20
-		$date = str_replace( ' ', 'T', $item->getTimeModified() ) . date( 'P' );
21
-		$params = array( 'd_name' => $item->getName( 'url' ), 'd_prodid' => $id );
22
-		$url = $this->url( $detailTarget, $detailCntl, $detailAction, $params, [], $detailConfig );
20
+		$date = str_replace(' ', 'T', $item->getTimeModified()) . date('P');
21
+		$params = array('d_name' => $item->getName('url'), 'd_prodid' => $id);
22
+		$url = $this->url($detailTarget, $detailCntl, $detailAction, $params, [], $detailConfig);
23 23
 ?>
24
-	<url><loc><?php echo $enc->xml( $url ); ?></loc><lastmod><?php echo $date; ?></lastmod><changefreq><?php echo $freq; ?></changefreq></url>
24
+	<url><loc><?php echo $enc->xml($url); ?></loc><lastmod><?php echo $date; ?></lastmod><changefreq><?php echo $freq; ?></changefreq></url>
25 25
 <?php endforeach; ?>
Please login to merge, or discard this patch.
controller/jobs/templates/product/export/sitemap-index-standard.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 $enc = $this->encoder();
9
-$date = date( 'c' );
9
+$date = date('c');
10 10
 
11 11
 ?>
12 12
 <?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
13 13
 
14 14
 
15 15
 <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
16
-<?php foreach( $this->get( 'siteFiles', [] ) as $name ) : ?>
16
+<?php foreach ($this->get('siteFiles', []) as $name) : ?>
17 17
 	<sitemap>
18
-		<loc><?php echo $enc->xml( basename( $name ) ); ?></loc>
18
+		<loc><?php echo $enc->xml(basename($name)); ?></loc>
19 19
 		<lastmod><?php echo $date; ?></lastmod>
20 20
 	</sitemap>
21 21
 <?php endforeach; ?>
Please login to merge, or discard this patch.