Completed
Push — master ( 212c5f...8d6a89 )
by Aimeos
08:59
created
lib/mwlib/tests/MW/DB/PDOTest.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		$conn = $this->object->acquire();
208 208
 
209 209
 		$value = "(\\')";
210
-		$sqlinsert = str_replace( ':value', '\'' . $conn->escape( $value ) . '\'', $sqlinsert );
210
+		$sqlinsert = str_replace( ':value', '\''.$conn->escape( $value ).'\'', $sqlinsert );
211 211
 		$stmt = $conn->create( $sqlinsert );
212 212
 		$stmt->execute()->finish();
213 213
 
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
 
236 236
 	public function testStmtSimpleBindTwo()
237 237
 	{
238
-		$sqlinsert2 =  'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
238
+		$sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
239 239
 
240 240
 		$conn = $this->object->acquire();
241 241
 
242 242
 		$stmt2 = $conn->create( $sqlinsert2 );
243
-		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
243
+		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
244 244
 		$stmt2->bind( 2, 0.12 );
245 245
 		$stmt2->execute()->finish();
246 246
 
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
 
253 253
 	public function testStmtSimpleBindThree()
254 254
 	{
255
-		$sqlinsert3 =  'INSERT INTO "mw_unit_test" ("name", "id") VALUES (\'?te?st?\', ?)';
255
+		$sqlinsert3 = 'INSERT INTO "mw_unit_test" ("name", "id") VALUES (\'?te?st?\', ?)';
256 256
 
257 257
 		$conn = $this->object->acquire();
258 258
 
259 259
 		$stmt2 = $conn->create( $sqlinsert3 );
260
-		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
260
+		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
261 261
 		$stmt2->execute()->finish();
262 262
 
263 263
 		$this->object->release( $conn );
@@ -268,15 +268,15 @@  discard block
 block discarded – undo
268 268
 
269 269
 	public function testStmtSimpleInvalidBindParamType()
270 270
 	{
271
-		$sqlinsert2 =  'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
271
+		$sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
272 272
 
273 273
 		$conn = $this->object->acquire();
274 274
 
275 275
 		try
276 276
 		{
277 277
 			$stmt2 = $conn->create( $sqlinsert2 );
278
-			$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
279
-			$stmt2->bind( 2, 0.15, 123);
278
+			$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
279
+			$stmt2->bind( 2, 0.15, 123 );
280 280
 			$stmt2->execute();
281 281
 		}
282 282
 		catch( \Aimeos\MW\DB\Exception $de )
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 		}
287 287
 
288 288
 		$this->object->release( $conn );
289
-		$this->fail('An expected exception has not been raised');
289
+		$this->fail( 'An expected exception has not been raised' );
290 290
 	}
291 291
 
292 292
 
@@ -299,13 +299,13 @@  discard block
 block discarded – undo
299 299
 		try {
300 300
 			$stmt = $conn->create( $sqlinsert );
301 301
 			$stmt->execute();
302
-		} catch ( \Aimeos\MW\DB\Exception $de ) {
302
+		} catch( \Aimeos\MW\DB\Exception $de ) {
303 303
 			$this->object->release( $conn );
304 304
 			return;
305 305
 		}
306 306
 
307 307
 		$this->object->release( $conn );
308
-		$this->fail('An expected exception has not been raised');
308
+		$this->fail( 'An expected exception has not been raised' );
309 309
 	}
310 310
 
311 311
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 
409 409
 	public function testWrongFieldType()
410 410
 	{
411
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
411
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
412 412
 		$sqlinsert = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
413 413
 
414 414
 		$conn = $this->object->acquire();
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 			$stmt->bind( 2, 'test', 123 );
421 421
 			$stmt->execute();
422 422
 		}
423
-		catch ( \Aimeos\MW\DB\Exception $e )
423
+		catch( \Aimeos\MW\DB\Exception $e )
424 424
 		{
425 425
 			$this->object->release( $conn );
426 426
 			throw $e;
@@ -444,13 +444,13 @@  discard block
 block discarded – undo
444 444
 
445 445
 		$conn = $this->object->acquire();
446 446
 
447
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
447
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
448 448
 
449 449
 		try
450 450
 		{
451 451
 			$conn->create( $sql )->execute()->finish();
452 452
 		}
453
-		catch ( \Aimeos\MW\DB\Exception $e )
453
+		catch( \Aimeos\MW\DB\Exception $e )
454 454
 		{
455 455
 			$this->object->release( $conn );
456 456
 			throw $e;
@@ -462,13 +462,13 @@  discard block
 block discarded – undo
462 462
 	{
463 463
 		$conn = $this->object->acquire();
464 464
 
465
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
465
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
466 466
 
467 467
 		try
468 468
 		{
469 469
 			$conn->create( 'SELECT *' )->execute()->finish();
470 470
 		}
471
-		catch ( \Aimeos\MW\DB\Exception $e )
471
+		catch( \Aimeos\MW\DB\Exception $e )
472 472
 		{
473 473
 			$this->object->release( $conn );
474 474
 			throw $e;
@@ -482,13 +482,13 @@  discard block
 block discarded – undo
482 482
 
483 483
 		$conn = $this->object->acquire();
484 484
 
485
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
485
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
486 486
 
487 487
 		try
488 488
 		{
489 489
 			$conn->create( $sql, 123 );
490 490
 		}
491
-		catch (\Aimeos\MW\DB\Exception $e)
491
+		catch( \Aimeos\MW\DB\Exception $e )
492 492
 		{
493 493
 			$this->object->release( $conn );
494 494
 			throw $e;
@@ -500,20 +500,20 @@  discard block
 block discarded – undo
500 500
 	{
501 501
 		$mock = $this->getMockBuilder( '\Aimeos\MW\DB\Connection\Iface' )->getMock();
502 502
 
503
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
503
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
504 504
 		$this->object->release( $mock );
505 505
 	}
506 506
 
507 507
 
508 508
 	public function testDBFactory()
509 509
 	{
510
-		$this->assertInstanceOf('\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object);
510
+		$this->assertInstanceOf( '\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object );
511 511
 	}
512 512
 
513 513
 
514 514
 	public function testFactoryFail()
515 515
 	{
516
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
516
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
517 517
 		\Aimeos\MW\DB\Factory::createManager( \TestHelperMw::getConfig(), 'notDefined' );
518 518
 	}
519 519
 }
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddLocaleData.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			$num++;
175 175
 		}
176 176
 
177
-		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
177
+		$this->status( $num > 0 ? $num.'/'.$total : 'OK' );
178 178
 	}
179 179
 
180 180
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 			$num++;
212 212
 		}
213 213
 
214
-		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
214
+		$this->status( $num > 0 ? $num.'/'.$total : 'OK' );
215 215
 	}
216 216
 
217 217
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,9 +240,13 @@
 block discarded – undo
240 240
 			$localeItem->setPosition( $dataset['pos'] );
241 241
 			$localeItem->setStatus( $dataset['status'] );
242 242
 
243
-			try {
243
+			try
244
+			{
244 245
 				$localeItemManager->saveItem( $localeItem );
245
-			} catch( \Exception $e ) {; } // if locale combination was already available
246
+			}
247
+			catch( \Exception $e )
248
+			{
249
+; } // if locale combination was already available
246 250
 		}
247 251
 
248 252
 		$this->status( 'done' );
Please login to merge, or discard this patch.