Completed
Push — master ( 90deda...7313f0 )
by Aimeos
12:32 queued 08:35
created
Controller/Common/Product/Import/Csv/Processor/Catalog/StandardTest.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -321,6 +321,7 @@
 block discarded – undo
321 321
 
322 322
 	/**
323 323
 	 * @param string $code
324
+	 * @return \Aimeos\MShop\Catalog\Item\Iface
324 325
 	 */
325 326
 	protected function get( $code )
326 327
 	{
Please login to merge, or discard this patch.
Spacing   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -16,45 +16,45 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public static function setUpBeforeClass()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperCntl::getContext() );
20
-		$typeManager = $manager->getSubmanager( 'type' );
19
+		$manager = \Aimeos\MShop\Product\Manager\Factory::createManager(\TestHelperCntl::getContext());
20
+		$typeManager = $manager->getSubmanager('type');
21 21
 
22 22
 		$typeSearch = $typeManager->createSearch();
23
-		$typeSearch->setConditions( $typeSearch->compare( '==', 'product.type.code', 'default' ) );
24
-		$result = $typeManager->searchItems( $typeSearch );
23
+		$typeSearch->setConditions($typeSearch->compare('==', 'product.type.code', 'default'));
24
+		$result = $typeManager->searchItems($typeSearch);
25 25
 
26
-		if( ( $typeItem = reset( $result ) ) === false ) {
27
-			throw new \RuntimeException( 'Product type "default" not found' );
26
+		if (($typeItem = reset($result)) === false) {
27
+			throw new \RuntimeException('Product type "default" not found');
28 28
 		}
29 29
 
30 30
 		$item = $manager->createItem();
31
-		$item->setCode( 'job_csv_prod' );
32
-		$item->setTypeId( $typeItem->getId() );
33
-		$item->setStatus( 1 );
31
+		$item->setCode('job_csv_prod');
32
+		$item->setTypeId($typeItem->getId());
33
+		$item->setStatus(1);
34 34
 
35
-		self::$product = $manager->saveItem( $item );
35
+		self::$product = $manager->saveItem($item);
36 36
 	}
37 37
 
38 38
 
39 39
 	public static function tearDownAfterClass()
40 40
 	{
41
-		$manager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperCntl::getContext() );
42
-		$manager->deleteItem( self::$product->getId() );
41
+		$manager = \Aimeos\MShop\Product\Manager\Factory::createManager(\TestHelperCntl::getContext());
42
+		$manager->deleteItem(self::$product->getId());
43 43
 	}
44 44
 
45 45
 
46 46
 	protected function setUp()
47 47
 	{
48
-		\Aimeos\MShop\Factory::setCache( true );
48
+		\Aimeos\MShop\Factory::setCache(true);
49 49
 
50 50
 		$this->context = \TestHelperCntl::getContext();
51
-		$this->endpoint = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Done( $this->context, [] );
51
+		$this->endpoint = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Done($this->context, []);
52 52
 	}
53 53
 
54 54
 
55 55
 	protected function tearDown()
56 56
 	{
57
-		\Aimeos\MShop\Factory::setCache( false );
57
+		\Aimeos\MShop\Factory::setCache(false);
58 58
 		\Aimeos\MShop\Factory::clear();
59 59
 	}
60 60
 
@@ -75,30 +75,30 @@  discard block
 block discarded – undo
75 75
 			3 => 'job_csv_test',
76 76
 		);
77 77
 
78
-		$this->create( 'job_csv_test' );
78
+		$this->create('job_csv_test');
79 79
 
80
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, $mapping, $this->endpoint );
81
-		$object->process( self::$product, $data );
80
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, $mapping, $this->endpoint);
81
+		$object->process(self::$product, $data);
82 82
 
83
-		$category = $this->get( 'job_csv_test' );
84
-		$this->delete( $category );
83
+		$category = $this->get('job_csv_test');
84
+		$this->delete($category);
85 85
 
86 86
 
87 87
 		$pos = 0;
88 88
 		$listItems = $category->getListItems();
89 89
 		$expected = array(
90
-			array( 'default', 'job_csv_prod' ),
91
-			array( 'promotion', 'job_csv_prod' ),
90
+			array('default', 'job_csv_prod'),
91
+			array('promotion', 'job_csv_prod'),
92 92
 		);
93 93
 
94
-		$this->assertEquals( 2, count( $listItems ) );
94
+		$this->assertEquals(2, count($listItems));
95 95
 
96
-		foreach( $listItems as $listItem )
96
+		foreach ($listItems as $listItem)
97 97
 		{
98
-			$this->assertEquals( 1, $listItem->getStatus() );
99
-			$this->assertEquals( 'product', $listItem->getDomain() );
100
-			$this->assertEquals( $expected[$pos][0], $listItem->getType() );
101
-			$this->assertEquals( $expected[$pos][1], $listItem->getRefItem()->getCode() );
98
+			$this->assertEquals(1, $listItem->getStatus());
99
+			$this->assertEquals('product', $listItem->getDomain());
100
+			$this->assertEquals($expected[$pos][0], $listItem->getType());
101
+			$this->assertEquals($expected[$pos][1], $listItem->getRefItem()->getCode());
102 102
 			$pos++;
103 103
 		}
104 104
 	}
@@ -120,32 +120,32 @@  discard block
 block discarded – undo
120 120
 			3 => "job_csv_test\njob_csv_test2",
121 121
 		);
122 122
 
123
-		$this->create( 'job_csv_test' );
124
-		$this->create( 'job_csv_test2' );
123
+		$this->create('job_csv_test');
124
+		$this->create('job_csv_test2');
125 125
 
126
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, $mapping, $this->endpoint );
127
-		$object->process( self::$product, $data );
126
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, $mapping, $this->endpoint);
127
+		$object->process(self::$product, $data);
128 128
 
129
-		$category = $this->get( 'job_csv_test' );
130
-		$category2 = $this->get( 'job_csv_test2' );
129
+		$category = $this->get('job_csv_test');
130
+		$category2 = $this->get('job_csv_test2');
131 131
 
132
-		$this->delete( $category );
133
-		$this->delete( $category2 );
132
+		$this->delete($category);
133
+		$this->delete($category2);
134 134
 
135 135
 
136 136
 		$pos = 0;
137
-		$types = array( 'default', 'promotion', 'default', 'promotion' );
137
+		$types = array('default', 'promotion', 'default', 'promotion');
138 138
 
139
-		foreach( array( $category->getListItems(), $category2->getListItems() ) as $listItems )
139
+		foreach (array($category->getListItems(), $category2->getListItems()) as $listItems)
140 140
 		{
141
-			$this->assertEquals( 2, count( $listItems ) );
141
+			$this->assertEquals(2, count($listItems));
142 142
 
143
-			foreach( $listItems as $listItem )
143
+			foreach ($listItems as $listItem)
144 144
 			{
145
-				$this->assertEquals( 1, $listItem->getStatus() );
146
-				$this->assertEquals( 'product', $listItem->getDomain() );
147
-				$this->assertEquals( $types[$pos], $listItem->getType() );
148
-				$this->assertEquals( 'job_csv_prod', $listItem->getRefItem()->getCode() );
145
+				$this->assertEquals(1, $listItem->getStatus());
146
+				$this->assertEquals('product', $listItem->getDomain());
147
+				$this->assertEquals($types[$pos], $listItem->getType());
148
+				$this->assertEquals('job_csv_prod', $listItem->getRefItem()->getCode());
149 149
 				$pos++;
150 150
 			}
151 151
 		}
@@ -169,23 +169,23 @@  discard block
 block discarded – undo
169 169
 			1 => 'job_csv_test',
170 170
 		);
171 171
 
172
-		$this->create( 'job_csv_test' );
172
+		$this->create('job_csv_test');
173 173
 
174
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, $mapping, $this->endpoint );
175
-		$object->process( self::$product, $data );
176
-		$object->process( self::$product, $dataUpdate );
174
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, $mapping, $this->endpoint);
175
+		$object->process(self::$product, $data);
176
+		$object->process(self::$product, $dataUpdate);
177 177
 
178
-		$category = $this->get( 'job_csv_test' );
179
-		$this->delete( $category );
178
+		$category = $this->get('job_csv_test');
179
+		$this->delete($category);
180 180
 
181 181
 
182 182
 		$listItems = $category->getListItems();
183
-		$listItem = reset( $listItems );
183
+		$listItem = reset($listItems);
184 184
 
185
-		$this->assertEquals( 1, count( $listItems ) );
186
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
185
+		$this->assertEquals(1, count($listItems));
186
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
187 187
 
188
-		$this->assertEquals( 'job_csv_prod', $listItem->getRefItem()->getCode() );
188
+		$this->assertEquals('job_csv_prod', $listItem->getRefItem()->getCode());
189 189
 	}
190 190
 
191 191
 
@@ -201,21 +201,21 @@  discard block
 block discarded – undo
201 201
 			1 => 'job_csv_test',
202 202
 		);
203 203
 
204
-		$this->create( 'job_csv_test' );
204
+		$this->create('job_csv_test');
205 205
 
206
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, $mapping, $this->endpoint );
207
-		$object->process( self::$product, $data );
206
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, $mapping, $this->endpoint);
207
+		$object->process(self::$product, $data);
208 208
 
209
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, [], $this->endpoint );
210
-		$object->process( self::$product, [] );
209
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, [], $this->endpoint);
210
+		$object->process(self::$product, []);
211 211
 
212
-		$category = $this->get( 'job_csv_test' );
213
-		$this->delete( $category );
212
+		$category = $this->get('job_csv_test');
213
+		$this->delete($category);
214 214
 
215 215
 
216 216
 		$listItems = $category->getListItems();
217 217
 
218
-		$this->assertEquals( 0, count( $listItems ) );
218
+		$this->assertEquals(0, count($listItems));
219 219
 	}
220 220
 
221 221
 
@@ -235,18 +235,18 @@  discard block
 block discarded – undo
235 235
 			3 => 'job_csv_test',
236 236
 		);
237 237
 
238
-		$this->create( 'job_csv_test' );
238
+		$this->create('job_csv_test');
239 239
 
240
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, $mapping, $this->endpoint );
241
-		$object->process( self::$product, $data );
240
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, $mapping, $this->endpoint);
241
+		$object->process(self::$product, $data);
242 242
 
243
-		$category = $this->get( 'job_csv_test' );
244
-		$this->delete( $category );
243
+		$category = $this->get('job_csv_test');
244
+		$this->delete($category);
245 245
 
246 246
 
247 247
 		$listItems = $category->getListItems();
248 248
 
249
-		$this->assertEquals( 1, count( $listItems ) );
249
+		$this->assertEquals(1, count($listItems));
250 250
 	}
251 251
 
252 252
 
@@ -266,71 +266,71 @@  discard block
 block discarded – undo
266 266
 			3 => 'job_csv_test',
267 267
 		);
268 268
 
269
-		$this->context->getConfig()->set( 'controller/common/product/import/csv/processor/catalog/listtypes', array( 'default' ) );
269
+		$this->context->getConfig()->set('controller/common/product/import/csv/processor/catalog/listtypes', array('default'));
270 270
 
271
-		$this->create( 'job_csv_test' );
271
+		$this->create('job_csv_test');
272 272
 
273
-		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard( $this->context, $mapping, $this->endpoint );
274
-		$object->process( self::$product, $data );
273
+		$object = new \Aimeos\Controller\Common\Product\Import\Csv\Processor\Catalog\Standard($this->context, $mapping, $this->endpoint);
274
+		$object->process(self::$product, $data);
275 275
 
276
-		$category = $this->get( 'job_csv_test' );
277
-		$this->delete( $category );
276
+		$category = $this->get('job_csv_test');
277
+		$this->delete($category);
278 278
 
279 279
 
280 280
 		$listItems = $category->getListItems();
281
-		$listItem = reset( $listItems );
281
+		$listItem = reset($listItems);
282 282
 
283
-		$this->assertEquals( 1, count( $listItems ) );
284
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem );
283
+		$this->assertEquals(1, count($listItems));
284
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $listItem);
285 285
 
286
-		$this->assertEquals( 'default', $listItem->getType() );
287
-		$this->assertEquals( 'job_csv_prod', $listItem->getRefItem()->getCode() );
286
+		$this->assertEquals('default', $listItem->getType());
287
+		$this->assertEquals('job_csv_prod', $listItem->getRefItem()->getCode());
288 288
 	}
289 289
 
290 290
 
291 291
 	/**
292 292
 	 * @param string $code
293 293
 	 */
294
-	protected function create( $code )
294
+	protected function create($code)
295 295
 	{
296
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
296
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
297 297
 
298 298
 		$item = $manager->createItem();
299
-		$item->setCode( $code );
299
+		$item->setCode($code);
300 300
 
301
-		$manager->insertItem( $item );
301
+		$manager->insertItem($item);
302 302
 
303 303
 		return $item;
304 304
 	}
305 305
 
306 306
 
307
-	protected function delete( \Aimeos\MShop\Catalog\Item\Iface $catItem )
307
+	protected function delete(\Aimeos\MShop\Catalog\Item\Iface $catItem)
308 308
 	{
309
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
310
-		$listManager = $manager->getSubManager( 'lists' );
309
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
310
+		$listManager = $manager->getSubManager('lists');
311 311
 
312
-		foreach( $catItem->getListItems('product') as $listItem ) {
313
-			$listManager->deleteItem( $listItem->getId() );
312
+		foreach ($catItem->getListItems('product') as $listItem) {
313
+			$listManager->deleteItem($listItem->getId());
314 314
 		}
315 315
 
316
-		$manager->deleteItem( $catItem->getId() );
316
+		$manager->deleteItem($catItem->getId());
317 317
 	}
318 318
 
319 319
 
320 320
 	/**
321 321
 	 * @param string $code
322 322
 	 */
323
-	protected function get( $code )
323
+	protected function get($code)
324 324
 	{
325
-		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( $this->context );
325
+		$manager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
326 326
 
327 327
 		$search = $manager->createSearch();
328
-		$search->setConditions( $search->compare( '==', 'catalog.code', $code ) );
328
+		$search->setConditions($search->compare('==', 'catalog.code', $code));
329 329
 
330
-		$result = $manager->searchItems( $search, array('product') );
330
+		$result = $manager->searchItems($search, array('product'));
331 331
 
332
-		if( ( $item = reset( $result ) ) === false ) {
333
-			throw new \RuntimeException( sprintf( 'No catalog item for code "%1$s"', $code ) );
332
+		if (($item = reset($result)) === false) {
333
+			throw new \RuntimeException(sprintf('No catalog item for code "%1$s"', $code));
334 334
 		}
335 335
 
336 336
 		return $item;
Please login to merge, or discard this patch.
jobs/tests/Controller/Jobs/Product/Export/Sitemap/FactoryTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 		$context = \TestHelperJobs::getContext();
15 15
 		$aimeos = \TestHelperJobs::getAimeos();
16 16
 
17
-		$obj = \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos );
18
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj);
17
+		$obj = \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos);
18
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $obj);
19 19
 	}
20 20
 
21 21
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
28
-		\Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos, 'Wrong$$$Name' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
28
+		\Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos, 'Wrong$$$Name');
29 29
 	}
30 30
 
31 31
 
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 		$context = \TestHelperJobs::getContext();
35 35
 		$aimeos = \TestHelperJobs::getAimeos();
36 36
 
37
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
38
-		\Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos, 'WrongClass' );
37
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
38
+		\Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos, 'WrongClass');
39 39
 	}
40 40
 
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		$context = \TestHelperJobs::getContext();
45 45
 		$aimeos = \TestHelperJobs::getAimeos();
46 46
 
47
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
48
-		\Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos, 'Factory' );
47
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
48
+		\Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos, 'Factory');
49 49
 	}
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Product/Export/FactoryTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 		$context = \TestHelperJobs::getContext();
15 15
 		$aimeos = \TestHelperJobs::getAimeos();
16 16
 
17
-		$obj = \Aimeos\Controller\Jobs\Product\Export\Factory::createController( $context, $aimeos );
18
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj);
17
+		$obj = \Aimeos\Controller\Jobs\Product\Export\Factory::createController($context, $aimeos);
18
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $obj);
19 19
 	}
20 20
 
21 21
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
28
-		\Aimeos\Controller\Jobs\Product\Export\Factory::createController( $context, $aimeos, 'Wrong$$$Name' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
28
+		\Aimeos\Controller\Jobs\Product\Export\Factory::createController($context, $aimeos, 'Wrong$$$Name');
29 29
 	}
30 30
 
31 31
 
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 		$context = \TestHelperJobs::getContext();
35 35
 		$aimeos = \TestHelperJobs::getAimeos();
36 36
 
37
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
38
-		\Aimeos\Controller\Jobs\Product\Export\Factory::createController( $context, $aimeos, 'WrongClass' );
37
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
38
+		\Aimeos\Controller\Jobs\Product\Export\Factory::createController($context, $aimeos, 'WrongClass');
39 39
 	}
40 40
 
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		$context = \TestHelperJobs::getContext();
45 45
 		$aimeos = \TestHelperJobs::getAimeos();
46 46
 
47
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
48
-		\Aimeos\Controller\Jobs\Product\Export\Factory::createController( $context, $aimeos, 'Factory' );
47
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
48
+		\Aimeos\Controller\Jobs\Product\Export\Factory::createController($context, $aimeos, 'Factory');
49 49
 	}
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Product/Import/Csv/FactoryTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 		$context = \TestHelperJobs::getContext();
15 15
 		$aimeos = \TestHelperJobs::getAimeos();
16 16
 
17
-		$obj = \Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController( $context, $aimeos );
18
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj);
17
+		$obj = \Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController($context, $aimeos);
18
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $obj);
19 19
 	}
20 20
 
21 21
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
28
-		\Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController( $context, $aimeos, 'Wrong$$$Name' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
28
+		\Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController($context, $aimeos, 'Wrong$$$Name');
29 29
 	}
30 30
 
31 31
 
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 		$context = \TestHelperJobs::getContext();
35 35
 		$aimeos = \TestHelperJobs::getAimeos();
36 36
 
37
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
38
-		\Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController( $context, $aimeos, 'WrongClass' );
37
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
38
+		\Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController($context, $aimeos, 'WrongClass');
39 39
 	}
40 40
 
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		$context = \TestHelperJobs::getContext();
45 45
 		$aimeos = \TestHelperJobs::getAimeos();
46 46
 
47
-		$this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' );
48
-		\Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController( $context, $aimeos, 'Factory' );
47
+		$this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
48
+		\Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController($context, $aimeos, 'Factory');
49 49
 	}
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Controller/Common/Product/Import/Csv/Cache/Attribute/StandardTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -14,49 +14,49 @@
 block discarded – undo
14 14
 
15 15
 	protected function setUp()
16 16
 	{
17
-		\Aimeos\MShop\Factory::setCache( true );
17
+		\Aimeos\MShop\Factory::setCache(true);
18 18
 
19 19
 		$context = \TestHelperCntl::getContext();
20
-		$this->object = new \Aimeos\Controller\Common\Product\Import\Csv\Cache\Attribute\Standard( $context );
20
+		$this->object = new \Aimeos\Controller\Common\Product\Import\Csv\Cache\Attribute\Standard($context);
21 21
 	}
22 22
 
23 23
 
24 24
 	protected function tearDown()
25 25
 	{
26
-		\Aimeos\MShop\Factory::setCache( false );
26
+		\Aimeos\MShop\Factory::setCache(false);
27 27
 		\Aimeos\MShop\Factory::clear();
28 28
 	}
29 29
 
30 30
 
31 31
 	public function testGet()
32 32
 	{
33
-		$item = $this->object->get( 'black', 'color' );
33
+		$item = $this->object->get('black', 'color');
34 34
 
35
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Attribute\\Item\\Iface', $item );
36
-		$this->assertEquals( 'black', $item->getCode() );
37
-		$this->assertEquals( 'color', $item->getType() );
35
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Attribute\\Item\\Iface', $item);
36
+		$this->assertEquals('black', $item->getCode());
37
+		$this->assertEquals('color', $item->getType());
38 38
 	}
39 39
 
40 40
 
41 41
 	public function testGetUnknown()
42 42
 	{
43
-		$this->assertEquals( null, $this->object->get( 'cache-test', 'color' ) );
43
+		$this->assertEquals(null, $this->object->get('cache-test', 'color'));
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testSet()
48 48
 	{
49
-		$item = $this->object->get( 'black', 'color' );
49
+		$item = $this->object->get('black', 'color');
50 50
 
51
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Attribute\\Item\\Iface', $item );
51
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Attribute\\Item\\Iface', $item);
52 52
 
53
-		$item->setCode( 'cache-test' );
53
+		$item->setCode('cache-test');
54 54
 
55
-		$this->object->set( $item );
56
-		$item = $this->object->get( 'cache-test', 'color' );
55
+		$this->object->set($item);
56
+		$item = $this->object->get('cache-test', 'color');
57 57
 
58
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Attribute\\Item\\Iface', $item );
59
-		$this->assertEquals( 'cache-test', $item->getCode() );
60
-		$this->assertEquals( 'color', $item->getType() );
58
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Attribute\\Item\\Iface', $item);
59
+		$this->assertEquals('cache-test', $item->getCode());
60
+		$this->assertEquals('color', $item->getType());
61 61
 	}
62 62
 }
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Index/Optimize/Standard.php 1 patch
Spacing   +3 added lines, -3 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', 'Index optimization' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Index optimization');
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', 'Optimizes the index for searching products faster' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Optimizes the index for searching products faster');
44 44
 	}
45 45
 
46 46
 
@@ -51,6 +51,6 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function run()
53 53
 	{
54
-		\Aimeos\MShop\Index\Manager\Factory::createManager( $this->getContext() )->optimize();
54
+		\Aimeos\MShop\Index\Manager\Factory::createManager($this->getContext())->optimize();
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Index/Rebuild/Standard.php 1 patch
Spacing   +7 added lines, -7 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', 'Index rebuild' );
32
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Index rebuild');
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', 'Rebuilds the index for searching products' );
43
+		return $this->getContext()->getI18n()->dt('controller/jobs', 'Rebuilds the index for searching products');
44 44
 	}
45 45
 
46 46
 
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function run()
53 53
 	{
54
-		$timestamp = date( 'Y-m-d H:i:s' );
54
+		$timestamp = date('Y-m-d H:i:s');
55 55
 		$context = clone $this->getContext();
56 56
 
57
-		$context->getLocale()->setLanguageId( null );
58
-		$context->getLocale()->setCurrencyId( null );
57
+		$context->getLocale()->setLanguageId(null);
58
+		$context->getLocale()->setCurrencyId(null);
59 59
 
60
-		$manager = \Aimeos\MShop\Index\Manager\Factory::createManager( $context );
60
+		$manager = \Aimeos\MShop\Index\Manager\Factory::createManager($context);
61 61
 
62 62
 		$manager->rebuildIndex();
63
-		$manager->cleanupIndex( $timestamp );
63
+		$manager->cleanupIndex($timestamp);
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Index/Optimize/StandardTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard( $context, $aimeos );
27
+		$this->object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard($context, $aimeos);
28 28
 	}
29 29
 
30 30
 
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function testGetName()
44 44
 	{
45
-		$this->assertEquals( 'Index optimization', $this->object->getName() );
45
+		$this->assertEquals('Index optimization', $this->object->getName());
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetDescription()
50 50
 	{
51 51
 		$text = 'Optimizes the index for searching products faster';
52
-		$this->assertEquals( $text, $this->object->getDescription() );
52
+		$this->assertEquals($text, $this->object->getDescription());
53 53
 	}
54 54
 
55 55
 
@@ -60,21 +60,21 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
 		$name = 'ControllerJobsCatalogIndexOptimizeDefaultRun';
63
-		$context->getConfig()->set( 'mshop/index/manager/name', $name );
63
+		$context->getConfig()->set('mshop/index/manager/name', $name);
64 64
 
65 65
 
66
-		$indexManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Index\\Manager\\Standard' )
67
-			->setMethods( array( 'optimize' ) )
68
-			->setConstructorArgs( array( $context ) )
66
+		$indexManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Index\\Manager\\Standard')
67
+			->setMethods(array('optimize'))
68
+			->setConstructorArgs(array($context))
69 69
 			->getMock();
70 70
 
71
-		\Aimeos\MShop\Catalog\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub );
71
+		\Aimeos\MShop\Catalog\Manager\Factory::injectManager('\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub);
72 72
 
73 73
 
74
-		$indexManagerStub->expects( $this->once() )->method( 'optimize' );
74
+		$indexManagerStub->expects($this->once())->method('optimize');
75 75
 
76 76
 
77
-		$object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard( $context, $aimeos );
77
+		$object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard($context, $aimeos);
78 78
 		$object->run();
79 79
 	}
80 80
 }
Please login to merge, or discard this patch.
controller/jobs/tests/Controller/Jobs/Index/Rebuild/StandardTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		$context = \TestHelperJobs::getContext();
25 25
 		$aimeos = \TestHelperJobs::getAimeos();
26 26
 
27
-		$this->object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard( $context, $aimeos );
27
+		$this->object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard($context, $aimeos);
28 28
 	}
29 29
 
30 30
 
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function testGetName()
44 44
 	{
45
-		$this->assertEquals( 'Index rebuild', $this->object->getName() );
45
+		$this->assertEquals('Index rebuild', $this->object->getName());
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetDescription()
50 50
 	{
51 51
 		$text = 'Rebuilds the index for searching products';
52
-		$this->assertEquals( $text, $this->object->getDescription() );
52
+		$this->assertEquals($text, $this->object->getDescription());
53 53
 	}
54 54
 
55 55
 
@@ -60,22 +60,22 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
 		$name = 'ControllerJobsCatalogIndexRebuildDefaultRun';
63
-		$context->getConfig()->set( 'mshop/index/manager/name', $name );
63
+		$context->getConfig()->set('mshop/index/manager/name', $name);
64 64
 
65 65
 
66
-		$indexManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Index\\Manager\\Standard' )
67
-			->setMethods( array( 'rebuildIndex', 'cleanupIndex' ) )
68
-			->setConstructorArgs( array( $context ) )
66
+		$indexManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Index\\Manager\\Standard')
67
+			->setMethods(array('rebuildIndex', 'cleanupIndex'))
68
+			->setConstructorArgs(array($context))
69 69
 			->getMock();
70 70
 
71
-		\Aimeos\MShop\Catalog\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub );
71
+		\Aimeos\MShop\Catalog\Manager\Factory::injectManager('\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub);
72 72
 
73 73
 
74
-		$indexManagerStub->expects( $this->once() )->method( 'rebuildIndex' );
75
-		$indexManagerStub->expects( $this->once() )->method( 'cleanupIndex' );
74
+		$indexManagerStub->expects($this->once())->method('rebuildIndex');
75
+		$indexManagerStub->expects($this->once())->method('cleanupIndex');
76 76
 
77 77
 
78
-		$object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard( $context, $aimeos );
78
+		$object = new \Aimeos\Controller\Jobs\Index\Rebuild\Standard($context, $aimeos);
79 79
 		$object->run();
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.