Completed
Push — master ( 6c75b7...90deda )
by Aimeos
15:40 queued 12:37
created
controller/jobs/src/Controller/Jobs/Order/Service/Delivery/Standard.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function getName()
31 31
 	{
32
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Process order delivery services' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Process order delivery services');
33 33
 	}
34 34
 
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function getDescription()
42 42
 	{
43
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Sends paid orders to the ERP system or logistic partner' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Sends paid orders to the ERP system or logistic partner');
44 44
 	}
45 45
 
46 46
 
@@ -68,74 +68,74 @@  discard block
 block discarded – undo
68 68
 		 * @see controller/jobs/order/email/payment/standard/limit-days
69 69
 		 * @see controller/jobs/order/email/delivery/standard/limit-days
70 70
 		 */
71
-		$days = $context->getConfig()->get( 'controller/jobs/order/service/delivery/limit-days', 90 );
72
-		$date = date( 'Y-m-d 00:00:00', time() - 86400 * $days );
71
+		$days = $context->getConfig()->get('controller/jobs/order/service/delivery/limit-days', 90);
72
+		$date = date('Y-m-d 00:00:00', time() - 86400 * $days);
73 73
 
74
-		$serviceManager = \Aimeos\MShop\Service\Manager\Factory::createManager( $context );
74
+		$serviceManager = \Aimeos\MShop\Service\Manager\Factory::createManager($context);
75 75
 		$serviceSearch = $serviceManager->createSearch();
76
-		$serviceSearch->setConditions( $serviceSearch->compare( '==', 'service.type.code', 'delivery' ) );
76
+		$serviceSearch->setConditions($serviceSearch->compare('==', 'service.type.code', 'delivery'));
77 77
 
78
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( $context );
78
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager($context);
79 79
 		$orderSearch = $orderManager->createSearch();
80 80
 
81 81
 		$start = 0;
82 82
 
83 83
 		do
84 84
 		{
85
-			$serviceItems = $serviceManager->searchItems( $serviceSearch );
85
+			$serviceItems = $serviceManager->searchItems($serviceSearch);
86 86
 
87
-			foreach( $serviceItems as $serviceItem )
87
+			foreach ($serviceItems as $serviceItem)
88 88
 			{
89 89
 				try
90 90
 				{
91
-					$serviceProvider = $serviceManager->getProvider( $serviceItem, $serviceItem->getType() );
91
+					$serviceProvider = $serviceManager->getProvider($serviceItem, $serviceItem->getType());
92 92
 
93 93
 					$expr = array(
94
-						$orderSearch->compare( '>', 'order.datepayment', $date ),
95
-						$orderSearch->compare( '>', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_PENDING ),
96
-						$orderSearch->compare( '==', 'order.statusdelivery', \Aimeos\MShop\Order\Item\Base::STAT_UNFINISHED ),
97
-						$orderSearch->compare( '==', 'order.base.service.code', $serviceItem->getCode() ),
98
-						$orderSearch->compare( '==', 'order.base.service.type', 'delivery' ),
94
+						$orderSearch->compare('>', 'order.datepayment', $date),
95
+						$orderSearch->compare('>', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_PENDING),
96
+						$orderSearch->compare('==', 'order.statusdelivery', \Aimeos\MShop\Order\Item\Base::STAT_UNFINISHED),
97
+						$orderSearch->compare('==', 'order.base.service.code', $serviceItem->getCode()),
98
+						$orderSearch->compare('==', 'order.base.service.type', 'delivery'),
99 99
 					);
100
-					$orderSearch->setConditions( $orderSearch->combine( '&&', $expr ) );
100
+					$orderSearch->setConditions($orderSearch->combine('&&', $expr));
101 101
 
102 102
 					$orderStart = 0;
103 103
 
104 104
 					do
105 105
 					{
106
-						$orderItems = $orderManager->searchItems( $orderSearch );
106
+						$orderItems = $orderManager->searchItems($orderSearch);
107 107
 
108
-						foreach( $orderItems as $orderItem )
108
+						foreach ($orderItems as $orderItem)
109 109
 						{
110 110
 							try
111 111
 							{
112
-								$serviceProvider->process( $orderItem );
113
-								$orderManager->saveItem( $orderItem );
112
+								$serviceProvider->process($orderItem);
113
+								$orderManager->saveItem($orderItem);
114 114
 							}
115
-							catch( \Exception $e )
115
+							catch (\Exception $e)
116 116
 							{
117 117
 								$str = 'Error while processing order with ID "%1$s": %2$s';
118
-								$context->getLogger()->log( sprintf( $str, $orderItem->getId(), $e->getMessage() ) );
118
+								$context->getLogger()->log(sprintf($str, $orderItem->getId(), $e->getMessage()));
119 119
 							}
120 120
 						}
121 121
 
122
-						$orderCount = count( $orderItems );
122
+						$orderCount = count($orderItems);
123 123
 						$orderStart += $orderCount;
124
-						$orderSearch->setSlice( $orderStart );
124
+						$orderSearch->setSlice($orderStart);
125 125
 					}
126
-					while( $orderCount >= $orderSearch->getSliceSize() );
126
+					while ($orderCount >= $orderSearch->getSliceSize());
127 127
 				}
128
-				catch( \Exception $e )
128
+				catch (\Exception $e)
129 129
 				{
130 130
 					$str = 'Error while processing service with ID "%1$s": %2$s';
131
-					$context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) );
131
+					$context->getLogger()->log(sprintf($str, $serviceItem->getId(), $e->getMessage()));
132 132
 				}
133 133
 			}
134 134
 
135
-			$count = count( $serviceItems );
135
+			$count = count($serviceItems);
136 136
 			$start += $count;
137
-			$serviceSearch->setSlice( $start );
137
+			$serviceSearch->setSlice($start);
138 138
 		}
139
-		while( $count >= $serviceSearch->getSliceSize() );
139
+		while ($count >= $serviceSearch->getSliceSize());
140 140
 	}
141 141
 }
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Order/Service/Async/Standard.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function getName()
31 31
 	{
32
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Batch update of payment/delivery status' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Batch update of payment/delivery status');
33 33
 	}
34 34
 
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function getDescription()
42 42
 	{
43
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Executes payment or delivery service providers that uses batch updates' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Executes payment or delivery service providers that uses batch updates');
44 44
 	}
45 45
 
46 46
 
@@ -52,32 +52,32 @@  discard block
 block discarded – undo
52 52
 	public function run()
53 53
 	{
54 54
 		$context = $this->getContext();
55
-		$serviceManager = \Aimeos\MShop\Factory::createManager( $context, 'service' );
55
+		$serviceManager = \Aimeos\MShop\Factory::createManager($context, 'service');
56 56
 
57 57
 		$search = $serviceManager->createSearch();
58 58
 		$start = 0;
59 59
 
60 60
 		do
61 61
 		{
62
-			$serviceItems = $serviceManager->searchItems( $search );
62
+			$serviceItems = $serviceManager->searchItems($search);
63 63
 
64
-			foreach( $serviceItems as $serviceItem )
64
+			foreach ($serviceItems as $serviceItem)
65 65
 			{
66 66
 				try
67 67
 				{
68
-					$serviceManager->getProvider( $serviceItem, $serviceItem->getType() )->updateAsync();
68
+					$serviceManager->getProvider($serviceItem, $serviceItem->getType())->updateAsync();
69 69
 				}
70
-				catch( \Exception $e )
70
+				catch (\Exception $e)
71 71
 				{
72 72
 					$msg = 'Executing updateAsyc() of "%1$s" failed: %2$s';
73
-					$context->getLogger()->log( sprintf( $msg, $serviceItem->getProvider(), $e->getMessage() ) );
73
+					$context->getLogger()->log(sprintf($msg, $serviceItem->getProvider(), $e->getMessage()));
74 74
 				}
75 75
 			}
76 76
 
77
-			$count = count( $serviceItems );
77
+			$count = count($serviceItems);
78 78
 			$start += $count;
79
-			$search->setSlice( $start );
79
+			$search->setSlice($start);
80 80
 		}
81
-		while( $count >= $search->getSliceSize() );
81
+		while ($count >= $search->getSliceSize());
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Order/Service/Payment/Standard.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function getName()
31 31
 	{
32
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Capture authorized payments' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Capture authorized payments');
33 33
 	}
34 34
 
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function getDescription()
42 42
 	{
43
-		return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Authorized payments of orders will be captured after dispatching or after a configurable amount of time' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Authorized payments of orders will be captured after dispatching or after a configurable amount of time');
44 44
 	}
45 45
 
46 46
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 		 * @category User
69 69
 		 * @category Developer
70 70
 		 */
71
-		$days = $config->get( 'controller/jobs/order/service/payment/limit-days', 90 );
72
-		$date = date( 'Y-m-d 00:00:00', time() - 86400 * $days );
71
+		$days = $config->get('controller/jobs/order/service/payment/limit-days', 90);
72
+		$date = date('Y-m-d 00:00:00', time() - 86400 * $days);
73 73
 
74 74
 		/** controller/jobs/order/service/payment/capture-days
75 75
 		 * Automatically capture payments after the configured amount of days
@@ -84,90 +84,90 @@  discard block
 block discarded – undo
84 84
 		 * @category User
85 85
 		 * @category Developer
86 86
 		 */
87
-		$capDays = $config->get( 'controller/jobs/order/service/payment/capture-days', null );
87
+		$capDays = $config->get('controller/jobs/order/service/payment/capture-days', null);
88 88
 
89 89
 
90
-		$serviceManager = \Aimeos\MShop\Factory::createManager( $context, 'service' );
90
+		$serviceManager = \Aimeos\MShop\Factory::createManager($context, 'service');
91 91
 		$serviceSearch = $serviceManager->createSearch();
92
-		$serviceSearch->setConditions( $serviceSearch->compare( '==', 'service.type.code', 'payment' ) );
92
+		$serviceSearch->setConditions($serviceSearch->compare('==', 'service.type.code', 'payment'));
93 93
 
94
-		$orderManager = \Aimeos\MShop\Factory::createManager( $context, 'order' );
94
+		$orderManager = \Aimeos\MShop\Factory::createManager($context, 'order');
95 95
 		$orderSearch = $orderManager->createSearch();
96 96
 
97
-		$status = array( \Aimeos\MShop\Order\Item\Base::STAT_DISPATCHED, \Aimeos\MShop\Order\Item\Base::STAT_DELIVERED );
97
+		$status = array(\Aimeos\MShop\Order\Item\Base::STAT_DISPATCHED, \Aimeos\MShop\Order\Item\Base::STAT_DELIVERED);
98 98
 		$start = 0;
99 99
 
100 100
 		do
101 101
 		{
102
-			$serviceItems = $serviceManager->searchItems( $serviceSearch );
102
+			$serviceItems = $serviceManager->searchItems($serviceSearch);
103 103
 
104
-			foreach( $serviceItems as $serviceItem )
104
+			foreach ($serviceItems as $serviceItem)
105 105
 			{
106 106
 				try
107 107
 				{
108
-					$serviceProvider = $serviceManager->getProvider( $serviceItem, $serviceItem->getType() );
108
+					$serviceProvider = $serviceManager->getProvider($serviceItem, $serviceItem->getType());
109 109
 
110
-					if( !$serviceProvider->isImplemented( \Aimeos\MShop\Service\Provider\Payment\Base::FEAT_CAPTURE ) ) {
110
+					if (!$serviceProvider->isImplemented(\Aimeos\MShop\Service\Provider\Payment\Base::FEAT_CAPTURE)) {
111 111
 						continue;
112 112
 					}
113 113
 
114 114
 
115 115
 					$expr = [];
116
-					$expr[] = $orderSearch->compare( '>', 'order.datepayment', $date );
116
+					$expr[] = $orderSearch->compare('>', 'order.datepayment', $date);
117 117
 
118
-					if( $capDays !== null )
118
+					if ($capDays !== null)
119 119
 					{
120
-						$capdate = date( 'Y-m-d 00:00:00', time() - 86400 * $capDays );
121
-						$expr[] = $orderSearch->compare( '<=', 'order.datepayment', $capdate );
120
+						$capdate = date('Y-m-d 00:00:00', time() - 86400 * $capDays);
121
+						$expr[] = $orderSearch->compare('<=', 'order.datepayment', $capdate);
122 122
 					}
123 123
 					else
124 124
 					{
125
-						$expr[] = $orderSearch->compare( '==', 'order.statusdelivery', $status );
125
+						$expr[] = $orderSearch->compare('==', 'order.statusdelivery', $status);
126 126
 					}
127 127
 
128
-					$expr[] = $orderSearch->compare( '==', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED );
129
-					$expr[] = $orderSearch->compare( '==', 'order.base.service.code', $serviceItem->getCode() );
130
-					$expr[] = $orderSearch->compare( '==', 'order.base.service.type', 'payment' );
128
+					$expr[] = $orderSearch->compare('==', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED);
129
+					$expr[] = $orderSearch->compare('==', 'order.base.service.code', $serviceItem->getCode());
130
+					$expr[] = $orderSearch->compare('==', 'order.base.service.type', 'payment');
131 131
 
132
-					$orderSearch->setConditions( $orderSearch->combine( '&&', $expr ) );
132
+					$orderSearch->setConditions($orderSearch->combine('&&', $expr));
133 133
 
134 134
 
135 135
 					$orderStart = 0;
136 136
 
137 137
 					do
138 138
 					{
139
-						$orderItems = $orderManager->searchItems( $orderSearch );
139
+						$orderItems = $orderManager->searchItems($orderSearch);
140 140
 
141
-						foreach( $orderItems as $orderItem )
141
+						foreach ($orderItems as $orderItem)
142 142
 						{
143 143
 							try
144 144
 							{
145
-								$serviceProvider->capture( $orderItem );
145
+								$serviceProvider->capture($orderItem);
146 146
 							}
147
-							catch( \Exception $e )
147
+							catch (\Exception $e)
148 148
 							{
149 149
 								$str = 'Error while capturing payment for order with ID "%1$s": %2$s';
150
-								$context->getLogger()->log( sprintf( $str, $orderItem->getId(), $e->getMessage() ) );
150
+								$context->getLogger()->log(sprintf($str, $orderItem->getId(), $e->getMessage()));
151 151
 							}
152 152
 						}
153 153
 
154
-						$orderCount = count( $orderItems );
154
+						$orderCount = count($orderItems);
155 155
 						$orderStart += $orderCount;
156
-						$orderSearch->setSlice( $orderStart );
156
+						$orderSearch->setSlice($orderStart);
157 157
 					}
158
-					while( $orderCount >= $orderSearch->getSliceSize() );
158
+					while ($orderCount >= $orderSearch->getSliceSize());
159 159
 				}
160
-				catch( \Exception $e )
160
+				catch (\Exception $e)
161 161
 				{
162 162
 					$str = 'Error while capturing payments for service with ID "%1$s": %2$s';
163
-					$context->getLogger()->log( sprintf( $str, $serviceItem->getId(), $e->getMessage() ) );
163
+					$context->getLogger()->log(sprintf($str, $serviceItem->getId(), $e->getMessage()));
164 164
 				}
165 165
 			}
166 166
 
167
-			$count = count( $serviceItems );
167
+			$count = count($serviceItems);
168 168
 			$start += $count;
169
-			$serviceSearch->setSlice( $start );
169
+			$serviceSearch->setSlice($start);
170 170
 		}
171
-		while( $count >= $serviceSearch->getSliceSize() );
171
+		while ($count >= $serviceSearch->getSliceSize());
172 172
 	}
173 173
 }
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Product/Export/Standard.php 1 patch
Spacing   +43 added lines, -43 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 export' );
31
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Product export');
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', 'Exports all available products' );
42
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Exports all available products');
43 43
 	}
44 44
 
45 45
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	public function run()
52 52
 	{
53 53
 		$container = $this->createContainer();
54
-		$this->export( $container );
54
+		$this->export($container);
55 55
 		$container->close();
56 56
 	}
57 57
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @param \Aimeos\MW\Container\Content\Iface $content File content object
63 63
 	 * @param \Aimeos\MShop\Product\Item\Iface[] $items List of product items
64 64
 	 */
65
-	protected function addItems( \Aimeos\MW\Container\Content\Iface $content, array $items )
65
+	protected function addItems(\Aimeos\MW\Container\Content\Iface $content, array $items)
66 66
 	{
67 67
 		/** controller/jobs/product/export/standard/template-items
68 68
 		 * Relative path to the XML items template of the product site map job controller.
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 		$view->exportItems = $items;
96 96
 
97
-		$content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) );
97
+		$content->add($view->render($context->getConfig()->get($tplconf, $default)));
98 98
 	}
99 99
 
100 100
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 		 * @see controller/jobs/product/export/max-items
124 124
 		 * @see controller/jobs/product/export/max-query
125 125
 		 */
126
-		$location = $config->get( 'controller/jobs/product/export/location', sys_get_temp_dir() );
126
+		$location = $config->get('controller/jobs/product/export/location', sys_get_temp_dir());
127 127
 
128 128
 		/** controller/jobs/product/export/standard/container/type
129 129
 		 * List of file container options for the export files
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		 * @see controller/jobs/product/export/max-items
141 141
 		 * @see controller/jobs/product/export/max-query
142 142
 		 */
143
-		$container = $config->get( 'controller/jobs/product/export/standard/container/type', 'Directory' );
143
+		$container = $config->get('controller/jobs/product/export/standard/container/type', 'Directory');
144 144
 
145 145
 		/** controller/jobs/product/export/standard/container/content
146 146
 		 * List of file container options for the export files
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 		 * @see controller/jobs/product/export/max-items
158 158
 		 * @see controller/jobs/product/export/max-query
159 159
 		 */
160
-		$content = $config->get( 'controller/jobs/product/export/standard/container/content', 'Binary' );
160
+		$content = $config->get('controller/jobs/product/export/standard/container/content', 'Binary');
161 161
 
162 162
 		/** controller/jobs/product/export/standard/container/options
163 163
 		 * List of file container options for the export files
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 		 * @see controller/jobs/product/export/max-items
175 175
 		 * @see controller/jobs/product/export/max-query
176 176
 		 */
177
-		$options = $config->get( 'controller/jobs/product/export/standard/container/options', [] );
177
+		$options = $config->get('controller/jobs/product/export/standard/container/options', []);
178 178
 
179
-		return \Aimeos\MW\Container\Factory::getContainer( $location, $container, $content, $options );
179
+		return \Aimeos\MW\Container\Factory::getContainer($location, $container, $content, $options);
180 180
 	}
181 181
 
182 182
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @param integer $filenum New file number
188 188
 	 * @return \Aimeos\MW\Container\Content\Iface New content object
189 189
 	 */
190
-	protected function createContent( \Aimeos\MW\Container\Iface $container, $filenum )
190
+	protected function createContent(\Aimeos\MW\Container\Iface $container, $filenum)
191 191
 	{
192 192
 		/** controller/jobs/product/export/standard/template-header
193 193
 		 * Relative path to the XML site map header template of the product site map job controller.
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
 		$context = $this->getContext();
218 218
 		$view = $context->getView();
219 219
 
220
-		$content = $container->create( $this->getFilename( $filenum ) );
221
-		$content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) );
222
-		$container->add( $content );
220
+		$content = $container->create($this->getFilename($filenum));
221
+		$content->add($view->render($context->getConfig()->get($tplconf, $default)));
222
+		$container->add($content);
223 223
 
224 224
 		return $content;
225 225
 	}
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	 *
231 231
 	 * @param \Aimeos\MW\Container\Content\Iface $content
232 232
 	 */
233
-	protected function closeContent( \Aimeos\MW\Container\Content\Iface $content )
233
+	protected function closeContent(\Aimeos\MW\Container\Content\Iface $content)
234 234
 	{
235 235
 		/** controller/jobs/product/export/standard/template-footer
236 236
 		 * Relative path to the XML site map footer template of the product site map job controller.
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 		$context = $this->getContext();
261 261
 		$view = $context->getView();
262 262
 
263
-		$content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) );
263
+		$content->add($view->render($context->getConfig()->get($tplconf, $default)));
264 264
 	}
265 265
 
266 266
 
@@ -270,45 +270,45 @@  discard block
 block discarded – undo
270 270
 	 * @param \Aimeos\MW\Container\Iface $container Container object
271 271
 	 * @return array List of content (file) names
272 272
 	 */
273
-	protected function export( \Aimeos\MW\Container\Iface $container )
273
+	protected function export(\Aimeos\MW\Container\Iface $container)
274 274
 	{
275
-		$default = array( 'attribute', 'media', 'price', 'product', 'text' );
275
+		$default = array('attribute', 'media', 'price', 'product', 'text');
276 276
 
277
-		$domains = $this->getConfig( 'domains', $default );
278
-		$maxItems = $this->getConfig( 'max-items', 10000 );
279
-		$maxQuery = $this->getConfig( 'max-query', 1000 );
277
+		$domains = $this->getConfig('domains', $default);
278
+		$maxItems = $this->getConfig('max-items', 10000);
279
+		$maxQuery = $this->getConfig('max-query', 1000);
280 280
 
281 281
 		$start = 0; $filenum = 1;
282 282
 		$names = [];
283 283
 
284
-		$productManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'product' );
284
+		$productManager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'product');
285 285
 
286
-		$search = $productManager->createSearch( true );
287
-		$search->setSortations( array( $search->sort( '+', 'product.id' ) ) );
288
-		$search->setSlice( 0, $maxQuery );
286
+		$search = $productManager->createSearch(true);
287
+		$search->setSortations(array($search->sort('+', 'product.id')));
288
+		$search->setSlice(0, $maxQuery);
289 289
 
290
-		$content = $this->createContent( $container, $filenum );
290
+		$content = $this->createContent($container, $filenum);
291 291
 		$names[] = $content->getResource();
292 292
 
293 293
 		do
294 294
 		{
295
-			$items = $productManager->searchItems( $search, $domains );
296
-			$this->addItems( $content, $items );
295
+			$items = $productManager->searchItems($search, $domains);
296
+			$this->addItems($content, $items);
297 297
 
298
-			$count = count( $items );
298
+			$count = count($items);
299 299
 			$start += $count;
300
-			$search->setSlice( $start, $maxQuery );
300
+			$search->setSlice($start, $maxQuery);
301 301
 
302
-			if( $start + $maxQuery > $maxItems * $filenum )
302
+			if ($start + $maxQuery > $maxItems * $filenum)
303 303
 			{
304
-				$this->closeContent( $content );
305
-				$content = $this->createContent( $container, ++$filenum );
304
+				$this->closeContent($content);
305
+				$content = $this->createContent($container, ++$filenum);
306 306
 				$names[] = $content->getResource();
307 307
 			}
308 308
 		}
309
-		while( $count >= $search->getSliceSize() );
309
+		while ($count >= $search->getSliceSize());
310 310
 
311
-		$this->closeContent( $content );
311
+		$this->closeContent($content);
312 312
 
313 313
 		return $names;
314 314
 	}
@@ -321,11 +321,11 @@  discard block
 block discarded – undo
321 321
 	 * @param mixed $default Default value if name is unknown
322 322
 	 * @return mixed Configuration value
323 323
 	 */
324
-	protected function getConfig( $name, $default = null )
324
+	protected function getConfig($name, $default = null)
325 325
 	{
326 326
 		$config = $this->getContext()->getConfig();
327 327
 
328
-		switch( $name )
328
+		switch ($name)
329 329
 		{
330 330
 			case 'domain':
331 331
 				/** controller/jobs/product/export/domains
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 				 * @see controller/jobs/product/export/max-items
349 349
 				 * @see controller/jobs/product/export/max-query
350 350
 				 */
351
-				return $config->get( 'controller/jobs/product/export/domains', $default );
351
+				return $config->get('controller/jobs/product/export/domains', $default);
352 352
 
353 353
 			case 'max-items':
354 354
 				/** controller/jobs/product/export/max-items
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 				 * @see controller/jobs/product/export/max-query
372 372
 				 * @see controller/jobs/product/export/domains
373 373
 				 */
374
-				return $config->get( 'controller/jobs/product/export/max-items', $default );
374
+				return $config->get('controller/jobs/product/export/max-items', $default);
375 375
 
376 376
 			case 'max-query':
377 377
 				/** controller/jobs/product/export/max-query
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 				 * @see controller/jobs/product/export/max-items
395 395
 				 * @see controller/jobs/product/export/domains
396 396
 				 */
397
-				return $config->get( 'controller/jobs/product/export/max-query', $default );
397
+				return $config->get('controller/jobs/product/export/max-query', $default);
398 398
 
399 399
 			case 'filename':
400 400
 				/** controller/jobs/product/export/filename
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 				 * @see controller/jobs/product/export/max-query
416 416
 				 * @see controller/jobs/product/export/domains
417 417
 				 */
418
-				return $config->get( 'controller/jobs/product/export/filename', $default );
418
+				return $config->get('controller/jobs/product/export/filename', $default);
419 419
 		}
420 420
 
421 421
 		return $default;
@@ -428,8 +428,8 @@  discard block
 block discarded – undo
428 428
 	 * @param integer $number Current file number
429 429
 	 * @return string New file name
430 430
 	 */
431
-	protected function getFilename( $number )
431
+	protected function getFilename($number)
432 432
 	{
433
-		return sprintf( $this->getConfig( 'filename', 'aimeos-products-%1$d_%2$s.xml' ), $number, date( 'Y-m-d_H:i:s' ) );
433
+		return sprintf($this->getConfig('filename', 'aimeos-products-%1$d_%2$s.xml'), $number, date('Y-m-d_H:i:s'));
434 434
 	}
435 435
 }
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Product/Export/StandardTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
 
19 19
 	protected function setUp()
20 20
 	{
21
-		\Aimeos\MShop\Factory::setCache( true );
21
+		\Aimeos\MShop\Factory::setCache(true);
22 22
 
23 23
 		$this->context = \TestHelperJobs::getContext();
24 24
 		$this->aimeos = \TestHelperJobs::getAimeos();
25 25
 
26
-		$this->object = new \Aimeos\Controller\Jobs\Product\Export\Standard( $this->context, $this->aimeos );
26
+		$this->object = new \Aimeos\Controller\Jobs\Product\Export\Standard($this->context, $this->aimeos);
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 35
 		$this->object = null;
@@ -38,34 +38,34 @@  discard block
 block discarded – undo
38 38
 
39 39
 	public function testGetName()
40 40
 	{
41
-		$this->assertEquals( 'Product export', $this->object->getName() );
41
+		$this->assertEquals('Product export', $this->object->getName());
42 42
 	}
43 43
 
44 44
 
45 45
 	public function testGetDescription()
46 46
 	{
47 47
 		$text = 'Exports all available products';
48
-		$this->assertEquals( $text, $this->object->getDescription() );
48
+		$this->assertEquals($text, $this->object->getDescription());
49 49
 	}
50 50
 
51 51
 
52 52
 	public function testRun()
53 53
 	{
54
-		$this->context->getConfig()->set( 'controller/jobs/product/export/filename', 'aimeos-products-%1$d.xml' );
54
+		$this->context->getConfig()->set('controller/jobs/product/export/filename', 'aimeos-products-%1$d.xml');
55 55
 
56 56
 		$this->object->run();
57 57
 
58 58
 		$ds = DIRECTORY_SEPARATOR;
59
-		$this->assertFileExists( 'tmp' . $ds . 'aimeos-products-1.xml' );
60
-		$this->assertFileExists( 'tmp' . $ds . 'aimeos-products-2.xml' );
59
+		$this->assertFileExists('tmp' . $ds . 'aimeos-products-1.xml');
60
+		$this->assertFileExists('tmp' . $ds . 'aimeos-products-2.xml');
61 61
 
62
-		$file1 = file_get_contents( 'tmp' . $ds . 'aimeos-products-1.xml' );
63
-		$file2 = file_get_contents( 'tmp' . $ds . 'aimeos-products-2.xml' );
62
+		$file1 = file_get_contents('tmp' . $ds . 'aimeos-products-1.xml');
63
+		$file2 = file_get_contents('tmp' . $ds . 'aimeos-products-2.xml');
64 64
 
65
-		unlink( 'tmp' . $ds . 'aimeos-products-1.xml' );
66
-		unlink( 'tmp' . $ds . 'aimeos-products-2.xml' );
65
+		unlink('tmp' . $ds . 'aimeos-products-1.xml');
66
+		unlink('tmp' . $ds . 'aimeos-products-2.xml');
67 67
 
68
-		$this->assertContains( 'CNE', $file1 );
69
-		$this->assertContains( 'U:BUNDLE', $file2 );
68
+		$this->assertContains('CNE', $file1);
69
+		$this->assertContains('U:BUNDLE', $file2);
70 70
 	}
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
controller/common/tests/Controller/Common/Catalog/Import/Csv/BaseTest.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -16,77 +16,77 @@  discard block
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		\Aimeos\MShop\Factory::setCache( true );
19
+		\Aimeos\MShop\Factory::setCache(true);
20 20
 
21 21
 		$context = \TestHelperCntl::getContext();
22 22
 		$aimeos = \TestHelperCntl::getAimeos();
23 23
 
24
-		$this->object = new TestAbstract( $context, $aimeos );
24
+		$this->object = new TestAbstract($context, $aimeos);
25 25
 	}
26 26
 
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		\Aimeos\MShop\Factory::setCache( false );
30
+		\Aimeos\MShop\Factory::setCache(false);
31 31
 		\Aimeos\MShop\Factory::clear();
32 32
 	}
33 33
 
34 34
 
35 35
 	public function testGetCacheInvalidType()
36 36
 	{
37
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
38
-		$this->object->getCachePublic( '$' );
37
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
38
+		$this->object->getCachePublic('$');
39 39
 	}
40 40
 
41 41
 
42 42
 	public function testGetCacheInvalidClass()
43 43
 	{
44
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
45
-		$this->object->getCachePublic( 'unknown' );
44
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
45
+		$this->object->getCachePublic('unknown');
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetProcessors()
50 50
 	{
51
-		$processor = $this->object->getProcessorsPublic( array( 'media' => [] ) );
51
+		$processor = $this->object->getProcessorsPublic(array('media' => []));
52 52
 
53
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Processor\\Iface', $processor );
53
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Processor\\Iface', $processor);
54 54
 	}
55 55
 
56 56
 
57 57
 	public function testGetProcessorsInvalidType()
58 58
 	{
59
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
60
-		$this->object->getProcessorsPublic( array( '$' => [] ) );
59
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
60
+		$this->object->getProcessorsPublic(array('$' => []));
61 61
 	}
62 62
 
63 63
 
64 64
 	public function testGetProcessorsInvalidClass()
65 65
 	{
66
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
67
-		$this->object->getProcessorsPublic( array( 'unknown' => [] ) );
66
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
67
+		$this->object->getProcessorsPublic(array('unknown' => []));
68 68
 	}
69 69
 
70 70
 
71 71
 	public function testGetProcessorsInvalidInterface()
72 72
 	{
73
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
74
-		$this->object->getProcessorsPublic( array( 'unknown' => [] ) );
73
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
74
+		$this->object->getProcessorsPublic(array('unknown' => []));
75 75
 	}
76 76
 
77 77
 
78 78
 	public function testGetTypeId()
79 79
 	{
80
-		$typeid = $this->object->getTypeIdPublic( 'text/type', 'catalog', 'name' );
80
+		$typeid = $this->object->getTypeIdPublic('text/type', 'catalog', 'name');
81 81
 
82
-		$this->assertNotEquals( null, $typeid );
82
+		$this->assertNotEquals(null, $typeid);
83 83
 	}
84 84
 
85 85
 
86 86
 	public function testGetTypeIdUnknown()
87 87
 	{
88
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
89
-		$this->object->getTypeIdPublic( 'text/type', 'catalog', 'unknown' );
88
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
89
+		$this->object->getTypeIdPublic('text/type', 'catalog', 'unknown');
90 90
 	}
91 91
 }
92 92
 
@@ -94,21 +94,21 @@  discard block
 block discarded – undo
94 94
 class TestAbstract
95 95
 	extends \Aimeos\Controller\Common\Catalog\Import\Csv\Base
96 96
 {
97
-	public function getCachePublic( $type, $name = null )
97
+	public function getCachePublic($type, $name = null)
98 98
 	{
99
-		return $this->getCache( $type, $name );
99
+		return $this->getCache($type, $name);
100 100
 	}
101 101
 
102 102
 
103
-	public function getProcessorsPublic( array $mappings )
103
+	public function getProcessorsPublic(array $mappings)
104 104
 	{
105
-		return $this->getProcessors( $mappings );
105
+		return $this->getProcessors($mappings);
106 106
 	}
107 107
 
108 108
 
109
-	public function getTypeIdPublic( $path, $domain, $code )
109
+	public function getTypeIdPublic($path, $domain, $code)
110 110
 	{
111
-		return $this->getTypeId( $path, $domain, $code );
111
+		return $this->getTypeId($path, $domain, $code);
112 112
 	}
113 113
 }
114 114
 
Please login to merge, or discard this patch.
tests/Controller/Common/Catalog/Import/Csv/Processor/Media/StandardTest.php 1 patch
Spacing   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		\Aimeos\MShop\Factory::setCache( true );
20
+		\Aimeos\MShop\Factory::setCache(true);
21 21
 
22 22
 		$this->context = \TestHelperCntl::getContext();
23
-		$this->endpoint = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Done( $this->context, [] );
23
+		$this->endpoint = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Done($this->context, []);
24 24
 	}
25 25
 
26 26
 
27 27
 	protected function tearDown()
28 28
 	{
29
-		\Aimeos\MShop\Factory::setCache( false );
29
+		\Aimeos\MShop\Factory::setCache(false);
30 30
 		\Aimeos\MShop\Factory::clear();
31 31
 	}
32 32
 
@@ -51,36 +51,36 @@  discard block
 block discarded – undo
51 51
 			5 => 1,
52 52
 		);
53 53
 
54
-		$catalog = $this->create( 'job_csv_test' );
54
+		$catalog = $this->create('job_csv_test');
55 55
 
56
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
57
-		$object->process( $catalog, $data );
56
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
57
+		$object->process($catalog, $data);
58 58
 
59
-		$catalog = $this->get( 'job_csv_test' );
60
-		$this->delete( $catalog );
59
+		$catalog = $this->get('job_csv_test');
60
+		$this->delete($catalog);
61 61
 
62 62
 
63 63
 		$listItems = $catalog->getListItems();
64
-		$listItem = reset( $listItems );
64
+		$listItem = reset($listItems);
65 65
 
66
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
67
-		$this->assertEquals( 1, count( $listItems ) );
66
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
67
+		$this->assertEquals(1, count($listItems));
68 68
 
69
-		$this->assertEquals( 1, $listItem->getStatus() );
70
-		$this->assertEquals( 0, $listItem->getPosition() );
71
-		$this->assertEquals( 'media', $listItem->getDomain() );
72
-		$this->assertEquals( 'default', $listItem->getType() );
69
+		$this->assertEquals(1, $listItem->getStatus());
70
+		$this->assertEquals(0, $listItem->getPosition());
71
+		$this->assertEquals('media', $listItem->getDomain());
72
+		$this->assertEquals('default', $listItem->getType());
73 73
 
74 74
 		$refItem = $listItem->getRefItem();
75 75
 
76
-		$this->assertEquals( 1, $refItem->getStatus() );
77
-		$this->assertEquals( 'default', $refItem->getType() );
78
-		$this->assertEquals( 'catalog', $refItem->getDomain() );
79
-		$this->assertEquals( 'test image', $refItem->getLabel() );
80
-		$this->assertEquals( 'image/jpeg', $refItem->getMimetype() );
81
-		$this->assertEquals( 'path/to/preview', $refItem->getPreview() );
82
-		$this->assertEquals( 'path/to/file', $refItem->getUrl() );
83
-		$this->assertEquals( 'de', $refItem->getLanguageId() );
76
+		$this->assertEquals(1, $refItem->getStatus());
77
+		$this->assertEquals('default', $refItem->getType());
78
+		$this->assertEquals('catalog', $refItem->getDomain());
79
+		$this->assertEquals('test image', $refItem->getLabel());
80
+		$this->assertEquals('image/jpeg', $refItem->getMimetype());
81
+		$this->assertEquals('path/to/preview', $refItem->getPreview());
82
+		$this->assertEquals('path/to/file', $refItem->getUrl());
83
+		$this->assertEquals('de', $refItem->getLanguageId());
84 84
 	}
85 85
 
86 86
 
@@ -94,24 +94,24 @@  discard block
 block discarded – undo
94 94
 			0 => "path/to/0\npath/to/1\npath/to/2\npath/to/3",
95 95
 		);
96 96
 
97
-		$catalog = $this->create( 'job_csv_test' );
97
+		$catalog = $this->create('job_csv_test');
98 98
 
99
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
100
-		$object->process( $catalog, $data );
99
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
100
+		$object->process($catalog, $data);
101 101
 
102
-		$catalog = $this->get( 'job_csv_test' );
103
-		$this->delete( $catalog );
102
+		$catalog = $this->get('job_csv_test');
103
+		$this->delete($catalog);
104 104
 
105 105
 
106 106
 		$pos = 0;
107 107
 		$listItems = $catalog->getListItems();
108
-		$expected = array( 'path/to/0', 'path/to/1', 'path/to/2', 'path/to/3' );
108
+		$expected = array('path/to/0', 'path/to/1', 'path/to/2', 'path/to/3');
109 109
 
110
-		$this->assertEquals( 4, count( $listItems ) );
110
+		$this->assertEquals(4, count($listItems));
111 111
 
112
-		foreach( $listItems as $listItem )
112
+		foreach ($listItems as $listItem)
113 113
 		{
114
-			$this->assertEquals( $expected[$pos], $listItem->getRefItem()->getUrl() );
114
+			$this->assertEquals($expected[$pos], $listItem->getRefItem()->getUrl());
115 115
 			$pos++;
116 116
 		}
117 117
 	}
@@ -133,23 +133,23 @@  discard block
 block discarded – undo
133 133
 			3 => 'path/to/3',
134 134
 		);
135 135
 
136
-		$catalog = $this->create( 'job_csv_test' );
136
+		$catalog = $this->create('job_csv_test');
137 137
 
138
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
139
-		$object->process( $catalog, $data );
138
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
139
+		$object->process($catalog, $data);
140 140
 
141
-		$catalog = $this->get( 'job_csv_test' );
142
-		$this->delete( $catalog );
141
+		$catalog = $this->get('job_csv_test');
142
+		$this->delete($catalog);
143 143
 
144 144
 
145 145
 		$pos = 0;
146 146
 		$listItems = $catalog->getListItems();
147 147
 
148
-		$this->assertEquals( 4, count( $listItems ) );
148
+		$this->assertEquals(4, count($listItems));
149 149
 
150
-		foreach( $listItems as $listItem )
150
+		foreach ($listItems as $listItem)
151 151
 		{
152
-			$this->assertEquals( $data[$pos], $listItem->getRefItem()->getUrl() );
152
+			$this->assertEquals($data[$pos], $listItem->getRefItem()->getUrl());
153 153
 			$pos++;
154 154
 		}
155 155
 	}
@@ -172,27 +172,27 @@  discard block
 block discarded – undo
172 172
 			1 => '',
173 173
 		);
174 174
 
175
-		$catalog = $this->create( 'job_csv_test' );
175
+		$catalog = $this->create('job_csv_test');
176 176
 
177
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
178
-		$object->process( $catalog, $data );
177
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
178
+		$object->process($catalog, $data);
179 179
 
180
-		$catalog = $this->get( 'job_csv_test' );
180
+		$catalog = $this->get('job_csv_test');
181 181
 
182
-		$object->process( $catalog, $dataUpdate );
182
+		$object->process($catalog, $dataUpdate);
183 183
 
184
-		$catalog = $this->get( 'job_csv_test' );
185
-		$this->delete( $catalog );
184
+		$catalog = $this->get('job_csv_test');
185
+		$this->delete($catalog);
186 186
 
187 187
 
188 188
 		$listItems = $catalog->getListItems();
189
-		$listItem = reset( $listItems );
189
+		$listItem = reset($listItems);
190 190
 
191
-		$this->assertEquals( 1, count( $listItems ) );
192
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
191
+		$this->assertEquals(1, count($listItems));
192
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
193 193
 
194
-		$this->assertEquals( 'path/to/new', $listItem->getRefItem()->getUrl() );
195
-		$this->assertEquals( null, $listItem->getRefItem()->getLanguageId() );
194
+		$this->assertEquals('path/to/new', $listItem->getRefItem()->getUrl());
195
+		$this->assertEquals(null, $listItem->getRefItem()->getLanguageId());
196 196
 	}
197 197
 
198 198
 
@@ -206,23 +206,23 @@  discard block
 block discarded – undo
206 206
 			0 => '/path/to/file',
207 207
 		);
208 208
 
209
-		$catalog = $this->create( 'job_csv_test' );
209
+		$catalog = $this->create('job_csv_test');
210 210
 
211
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
212
-		$object->process( $catalog, $data );
211
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
212
+		$object->process($catalog, $data);
213 213
 
214
-		$catalog = $this->get( 'job_csv_test' );
214
+		$catalog = $this->get('job_csv_test');
215 215
 
216
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, [], $this->endpoint );
217
-		$object->process( $catalog, [] );
216
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, [], $this->endpoint);
217
+		$object->process($catalog, []);
218 218
 
219
-		$catalog = $this->get( 'job_csv_test' );
220
-		$this->delete( $catalog );
219
+		$catalog = $this->get('job_csv_test');
220
+		$this->delete($catalog);
221 221
 
222 222
 
223 223
 		$listItems = $catalog->getListItems();
224 224
 
225
-		$this->assertEquals( 0, count( $listItems ) );
225
+		$this->assertEquals(0, count($listItems));
226 226
 	}
227 227
 
228 228
 
@@ -238,18 +238,18 @@  discard block
 block discarded – undo
238 238
 			1 => '',
239 239
 		);
240 240
 
241
-		$catalog = $this->create( 'job_csv_test' );
241
+		$catalog = $this->create('job_csv_test');
242 242
 
243
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
244
-		$object->process( $catalog, $data );
243
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
244
+		$object->process($catalog, $data);
245 245
 
246
-		$catalog = $this->get( 'job_csv_test' );
247
-		$this->delete( $catalog );
246
+		$catalog = $this->get('job_csv_test');
247
+		$this->delete($catalog);
248 248
 
249 249
 
250 250
 		$listItems = $catalog->getListItems();
251 251
 
252
-		$this->assertEquals( 1, count( $listItems ) );
252
+		$this->assertEquals(1, count($listItems));
253 253
 	}
254 254
 
255 255
 
@@ -269,64 +269,64 @@  discard block
 block discarded – undo
269 269
 			3 => 'default',
270 270
 		);
271 271
 
272
-		$this->context->getConfig()->set( 'controller/common/catalog/import/csv/processor/media/listtypes', array( 'default' ) );
272
+		$this->context->getConfig()->set('controller/common/catalog/import/csv/processor/media/listtypes', array('default'));
273 273
 
274
-		$catalog = $this->create( 'job_csv_test' );
274
+		$catalog = $this->create('job_csv_test');
275 275
 
276
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard( $this->context, $mapping, $this->endpoint );
277
-		$object->process( $catalog, $data );
276
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Media\Standard($this->context, $mapping, $this->endpoint);
277
+		$object->process($catalog, $data);
278 278
 
279
-		$catalog = $this->get( 'job_csv_test' );
280
-		$this->delete( $catalog );
279
+		$catalog = $this->get('job_csv_test');
280
+		$this->delete($catalog);
281 281
 
282 282
 
283 283
 		$listItems = $catalog->getListItems();
284
-		$listItem = reset( $listItems );
284
+		$listItem = reset($listItems);
285 285
 
286
-		$this->assertEquals( 1, count( $listItems ) );
287
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
286
+		$this->assertEquals(1, count($listItems));
287
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
288 288
 
289
-		$this->assertEquals( 'default', $listItem->getType() );
290
-		$this->assertEquals( 'path/to/file2', $listItem->getRefItem()->getUrl() );
289
+		$this->assertEquals('default', $listItem->getType());
290
+		$this->assertEquals('path/to/file2', $listItem->getRefItem()->getUrl());
291 291
 	}
292 292
 
293 293
 
294 294
 	/**
295 295
 	 * @param string $code
296 296
 	 */
297
-	protected function create( $code )
297
+	protected function create($code)
298 298
 	{
299
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
299
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
300 300
 
301 301
 		$item = $manager->createItem();
302
-		$item->setCode( $code );
302
+		$item->setCode($code);
303 303
 
304
-		return $manager->insertItem( $item );
304
+		return $manager->insertItem($item);
305 305
 	}
306 306
 
307 307
 
308
-	protected function delete( \Aimeos\MShop\Catalog\Item\Iface $catalog )
308
+	protected function delete(\Aimeos\MShop\Catalog\Item\Iface $catalog)
309 309
 	{
310
-		$mediaManager = \Aimeos\MShop\Media\Manager\Factory::createManager( $this->context );
311
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
312
-		$listManager = $manager->getSubManager( 'lists' );
310
+		$mediaManager = \Aimeos\MShop\Media\Manager\Factory::createManager($this->context);
311
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
312
+		$listManager = $manager->getSubManager('lists');
313 313
 
314
-		foreach( $catalog->getListItems('media') as $listItem )
314
+		foreach ($catalog->getListItems('media') as $listItem)
315 315
 		{
316
-			$mediaManager->deleteItem( $listItem->getRefItem()->getId() );
317
-			$listManager->deleteItem( $listItem->getId() );
316
+			$mediaManager->deleteItem($listItem->getRefItem()->getId());
317
+			$listManager->deleteItem($listItem->getId());
318 318
 		}
319 319
 
320
-		$manager->deleteItem( $catalog->getId() );
320
+		$manager->deleteItem($catalog->getId());
321 321
 	}
322 322
 
323 323
 
324 324
 	/**
325 325
 	 * @param string $code
326 326
 	 */
327
-	protected function get( $code )
327
+	protected function get($code)
328 328
 	{
329
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
330
-		return $manager->findItem( $code, array('media') );
329
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
330
+		return $manager->findItem($code, array('media'));
331 331
 	}
332 332
 }
333 333
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Controller/Common/Catalog/Import/Csv/Processor/Text/StandardTest.php 1 patch
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		\Aimeos\MShop\Factory::setCache( true );
20
+		\Aimeos\MShop\Factory::setCache(true);
21 21
 
22 22
 		$this->context = \TestHelperCntl::getContext();
23
-		$this->endpoint = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Done( $this->context, [] );
23
+		$this->endpoint = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Done($this->context, []);
24 24
 	}
25 25
 
26 26
 
27 27
 	protected function tearDown()
28 28
 	{
29
-		\Aimeos\MShop\Factory::setCache( false );
29
+		\Aimeos\MShop\Factory::setCache(false);
30 30
 		\Aimeos\MShop\Factory::clear();
31 31
 	}
32 32
 
@@ -49,35 +49,35 @@  discard block
 block discarded – undo
49 49
 			4 => 1,
50 50
 		);
51 51
 
52
-		$catalog = $this->create( 'job_csv_test' );
52
+		$catalog = $this->create('job_csv_test');
53 53
 
54
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, $mapping, $this->endpoint );
55
-		$object->process( $catalog, $data );
54
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, $mapping, $this->endpoint);
55
+		$object->process($catalog, $data);
56 56
 
57
-		$catalog = $this->get( 'job_csv_test' );
58
-		$this->delete( $catalog );
57
+		$catalog = $this->get('job_csv_test');
58
+		$this->delete($catalog);
59 59
 
60 60
 
61 61
 		$listItems = $catalog->getListItems();
62
-		$listItem = reset( $listItems );
62
+		$listItem = reset($listItems);
63 63
 
64
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
65
-		$this->assertEquals( 1, count( $listItems ) );
64
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
65
+		$this->assertEquals(1, count($listItems));
66 66
 
67
-		$this->assertEquals( 1, $listItem->getStatus() );
68
-		$this->assertEquals( 0, $listItem->getPosition() );
69
-		$this->assertEquals( 'text', $listItem->getDomain() );
70
-		$this->assertEquals( 'default', $listItem->getType() );
67
+		$this->assertEquals(1, $listItem->getStatus());
68
+		$this->assertEquals(0, $listItem->getPosition());
69
+		$this->assertEquals('text', $listItem->getDomain());
70
+		$this->assertEquals('default', $listItem->getType());
71 71
 
72 72
 		$refItem = $listItem->getRefItem();
73 73
 
74
-		$this->assertEquals( 1, $refItem->getStatus() );
75
-		$this->assertEquals( 'name', $refItem->getType() );
76
-		$this->assertEquals( 'catalog', $refItem->getDomain() );
77
-		$this->assertEquals( 'test text', $refItem->getLabel() );
78
-		$this->assertEquals( 'Job CSV test', $refItem->getContent() );
79
-		$this->assertEquals( 'de', $refItem->getLanguageId() );
80
-		$this->assertEquals( 1, $refItem->getStatus() );
74
+		$this->assertEquals(1, $refItem->getStatus());
75
+		$this->assertEquals('name', $refItem->getType());
76
+		$this->assertEquals('catalog', $refItem->getDomain());
77
+		$this->assertEquals('test text', $refItem->getLabel());
78
+		$this->assertEquals('Job CSV test', $refItem->getContent());
79
+		$this->assertEquals('de', $refItem->getLanguageId());
80
+		$this->assertEquals(1, $refItem->getStatus());
81 81
 	}
82 82
 
83 83
 
@@ -105,30 +105,30 @@  discard block
 block discarded – undo
105 105
 			7 => 'Long: Job CSV test 2',
106 106
 		);
107 107
 
108
-		$catalog = $this->create( 'job_csv_test' );
108
+		$catalog = $this->create('job_csv_test');
109 109
 
110
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, $mapping, $this->endpoint );
111
-		$object->process( $catalog, $data );
110
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, $mapping, $this->endpoint);
111
+		$object->process($catalog, $data);
112 112
 
113
-		$catalog = $this->get( 'job_csv_test' );
114
-		$this->delete( $catalog );
113
+		$catalog = $this->get('job_csv_test');
114
+		$this->delete($catalog);
115 115
 
116 116
 
117 117
 		$pos = 0;
118 118
 		$listItems = $catalog->getListItems();
119 119
 		$expected = array(
120
-			0 => array( 'name', 'Job CSV test' ),
121
-			1 => array( 'short', 'Short: Job CSV test' ),
122
-			2 => array( 'long', 'Long: Job CSV test' ),
123
-			3 => array( 'long', 'Long: Job CSV test 2' ),
120
+			0 => array('name', 'Job CSV test'),
121
+			1 => array('short', 'Short: Job CSV test'),
122
+			2 => array('long', 'Long: Job CSV test'),
123
+			3 => array('long', 'Long: Job CSV test 2'),
124 124
 		);
125 125
 
126
-		$this->assertEquals( 4, count( $listItems ) );
126
+		$this->assertEquals(4, count($listItems));
127 127
 
128
-		foreach( $listItems as $listItem )
128
+		foreach ($listItems as $listItem)
129 129
 		{
130
-			$this->assertEquals( $expected[$pos][0], $listItem->getRefItem()->getType() );
131
-			$this->assertEquals( $expected[$pos][1], $listItem->getRefItem()->getContent() );
130
+			$this->assertEquals($expected[$pos][0], $listItem->getRefItem()->getType());
131
+			$this->assertEquals($expected[$pos][1], $listItem->getRefItem()->getContent());
132 132
 			$pos++;
133 133
 		}
134 134
 	}
@@ -151,27 +151,27 @@  discard block
 block discarded – undo
151 151
 			1 => 'Short: Job CSV test',
152 152
 		);
153 153
 
154
-		$catalog = $this->create( 'job_csv_test' );
154
+		$catalog = $this->create('job_csv_test');
155 155
 
156
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, $mapping, $this->endpoint );
157
-		$object->process( $catalog, $data );
156
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, $mapping, $this->endpoint);
157
+		$object->process($catalog, $data);
158 158
 
159
-		$catalog = $this->get( 'job_csv_test' );
159
+		$catalog = $this->get('job_csv_test');
160 160
 
161
-		$object->process( $catalog, $dataUpdate );
161
+		$object->process($catalog, $dataUpdate);
162 162
 
163
-		$catalog = $this->get( 'job_csv_test' );
164
-		$this->delete( $catalog );
163
+		$catalog = $this->get('job_csv_test');
164
+		$this->delete($catalog);
165 165
 
166 166
 
167 167
 		$listItems = $catalog->getListItems();
168
-		$listItem = reset( $listItems );
168
+		$listItem = reset($listItems);
169 169
 
170
-		$this->assertEquals( 1, count( $listItems ) );
171
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
170
+		$this->assertEquals(1, count($listItems));
171
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
172 172
 
173
-		$this->assertEquals( 'short', $listItem->getRefItem()->getType() );
174
-		$this->assertEquals( 'Short: Job CSV test', $listItem->getRefItem()->getContent() );
173
+		$this->assertEquals('short', $listItem->getRefItem()->getType());
174
+		$this->assertEquals('Short: Job CSV test', $listItem->getRefItem()->getContent());
175 175
 	}
176 176
 
177 177
 
@@ -187,23 +187,23 @@  discard block
 block discarded – undo
187 187
 			1 => 'Job CSV test',
188 188
 		);
189 189
 
190
-		$catalog = $this->create( 'job_csv_test' );
190
+		$catalog = $this->create('job_csv_test');
191 191
 
192
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, $mapping, $this->endpoint );
193
-		$object->process( $catalog, $data );
192
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, $mapping, $this->endpoint);
193
+		$object->process($catalog, $data);
194 194
 
195
-		$catalog = $this->get( 'job_csv_test' );
195
+		$catalog = $this->get('job_csv_test');
196 196
 
197
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, [], $this->endpoint );
198
-		$object->process( $catalog, [] );
197
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, [], $this->endpoint);
198
+		$object->process($catalog, []);
199 199
 
200
-		$catalog = $this->get( 'job_csv_test' );
201
-		$this->delete( $catalog );
200
+		$catalog = $this->get('job_csv_test');
201
+		$this->delete($catalog);
202 202
 
203 203
 
204 204
 		$listItems = $catalog->getListItems();
205 205
 
206
-		$this->assertEquals( 0, count( $listItems ) );
206
+		$this->assertEquals(0, count($listItems));
207 207
 	}
208 208
 
209 209
 
@@ -223,18 +223,18 @@  discard block
 block discarded – undo
223 223
 			3 => '',
224 224
 		);
225 225
 
226
-		$catalog = $this->create( 'job_csv_test' );
226
+		$catalog = $this->create('job_csv_test');
227 227
 
228
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, $mapping, $this->endpoint );
229
-		$object->process( $catalog, $data );
228
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, $mapping, $this->endpoint);
229
+		$object->process($catalog, $data);
230 230
 
231
-		$catalog = $this->get( 'job_csv_test' );
232
-		$this->delete( $catalog );
231
+		$catalog = $this->get('job_csv_test');
232
+		$this->delete($catalog);
233 233
 
234 234
 
235 235
 		$listItems = $catalog->getListItems();
236 236
 
237
-		$this->assertEquals( 1, count( $listItems ) );
237
+		$this->assertEquals(1, count($listItems));
238 238
 	}
239 239
 
240 240
 
@@ -258,65 +258,65 @@  discard block
 block discarded – undo
258 258
 			5 => 'default',
259 259
 		);
260 260
 
261
-		$this->context->getConfig()->set( 'controller/common/catalog/import/csv/processor/text/listtypes', array( 'default' ) );
261
+		$this->context->getConfig()->set('controller/common/catalog/import/csv/processor/text/listtypes', array('default'));
262 262
 
263
-		$catalog = $this->create( 'job_csv_test' );
263
+		$catalog = $this->create('job_csv_test');
264 264
 
265
-		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard( $this->context, $mapping, $this->endpoint );
266
-		$object->process( $catalog, $data );
265
+		$object = new \Aimeos\Controller\Common\Catalog\Import\Csv\Processor\Text\Standard($this->context, $mapping, $this->endpoint);
266
+		$object->process($catalog, $data);
267 267
 
268
-		$catalog = $this->get( 'job_csv_test' );
269
-		$this->delete( $catalog );
268
+		$catalog = $this->get('job_csv_test');
269
+		$this->delete($catalog);
270 270
 
271 271
 
272 272
 		$listItems = $catalog->getListItems();
273
-		$listItem = reset( $listItems );
273
+		$listItem = reset($listItems);
274 274
 
275
-		$this->assertEquals( 1, count( $listItems ) );
276
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
275
+		$this->assertEquals(1, count($listItems));
276
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
277 277
 
278
-		$this->assertEquals( 'default', $listItem->getType() );
279
-		$this->assertEquals( 'short', $listItem->getRefItem()->getType() );
280
-		$this->assertEquals( 'test short', $listItem->getRefItem()->getContent() );
278
+		$this->assertEquals('default', $listItem->getType());
279
+		$this->assertEquals('short', $listItem->getRefItem()->getType());
280
+		$this->assertEquals('test short', $listItem->getRefItem()->getContent());
281 281
 	}
282 282
 
283 283
 
284 284
 	/**
285 285
 	 * @param string $code
286 286
 	 */
287
-	protected function create( $code )
287
+	protected function create($code)
288 288
 	{
289
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
289
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
290 290
 
291 291
 		$item = $manager->createItem();
292
-		$item->setCode( $code );
292
+		$item->setCode($code);
293 293
 
294
-		return $manager->insertItem( $item );
294
+		return $manager->insertItem($item);
295 295
 	}
296 296
 
297 297
 
298
-	protected function delete( \Aimeos\MShop\Catalog\Item\Iface $catalog )
298
+	protected function delete(\Aimeos\MShop\Catalog\Item\Iface $catalog)
299 299
 	{
300
-		$textManager = \Aimeos\MShop\Text\Manager\Factory::createManager( $this->context );
301
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
302
-		$listManager = $manager->getSubManager( 'lists' );
300
+		$textManager = \Aimeos\MShop\Text\Manager\Factory::createManager($this->context);
301
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
302
+		$listManager = $manager->getSubManager('lists');
303 303
 
304
-		foreach( $catalog->getListItems('text') as $listItem )
304
+		foreach ($catalog->getListItems('text') as $listItem)
305 305
 		{
306
-			$textManager->deleteItem( $listItem->getRefItem()->getId() );
307
-			$listManager->deleteItem( $listItem->getId() );
306
+			$textManager->deleteItem($listItem->getRefItem()->getId());
307
+			$listManager->deleteItem($listItem->getId());
308 308
 		}
309 309
 
310
-		$manager->deleteItem( $catalog->getId() );
310
+		$manager->deleteItem($catalog->getId());
311 311
 	}
312 312
 
313 313
 
314 314
 	/**
315 315
 	 * @param string $code
316 316
 	 */
317
-	protected function get( $code )
317
+	protected function get($code)
318 318
 	{
319
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
320
-		return $manager->findItem( $code, ['text'] );
319
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
320
+		return $manager->findItem($code, ['text']);
321 321
 	}
322 322
 }
323 323
\ No newline at end of file
Please login to merge, or discard this patch.
common/tests/Controller/Common/Product/Import/Csv/Processor/DoneTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		\Aimeos\MShop\Factory::setCache( true );
20
+		\Aimeos\MShop\Factory::setCache(true);
21 21
 
22 22
 		$this->context = \TestHelperCntl::getContext();
23
-		$this->object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Done( $this->context, [] );
23
+		$this->object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Done($this->context, []);
24 24
 	}
25 25
 
26 26
 
27 27
 	protected function tearDown()
28 28
 	{
29
-		\Aimeos\MShop\Factory::setCache( false );
29
+		\Aimeos\MShop\Factory::setCache(false);
30 30
 		\Aimeos\MShop\Factory::clear();
31 31
 
32 32
 		$this->object = null;
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 
36 36
 	public function testProcess()
37 37
 	{
38
-		$product = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->createItem();
38
+		$product = \Aimeos\MShop\Factory::createManager($this->context, 'product')->createItem();
39 39
 
40
-		$result = $this->object->process( $product, array( 'test' ) );
40
+		$result = $this->object->process($product, array('test'));
41 41
 
42
-		$this->assertEquals( array( 'test' ), $result );
42
+		$this->assertEquals(array('test'), $result);
43 43
 	}
44 44
 }
45 45
\ No newline at end of file
Please login to merge, or discard this patch.