Completed
Push — master ( bb2531...13f21d )
by Aimeos
07:57
created
lib/mwlib/tests/MW/Config/testfiles/subconfig/subsubconfig/default.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return array(
4
-	'subsubitem' => array (
4
+	'subsubitem' => array(
5 5
 		'aa' => array(
6 6
 			'aaa' => '111',
7 7
 		),
8 8
 	),
9 9
 	'subsubblablub' => array(
10
-		'bb' => array (
10
+		'bb' => array(
11 11
 			'bbb' => '222',
12 12
 		),
13 13
 	),
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Config/testfiles/subconfig/default.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return array(
4
-	'subitem' => array (
4
+	'subitem' => array(
5 5
 		'a' => array(
6 6
 			'aa' => '11',
7 7
 		),
8 8
 	),
9 9
 	'subbla' => array(
10
-		'b' => array (
10
+		'b' => array(
11 11
 			'bb' => '22',
12 12
 		),
13 13
 	),
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Config/PHPArrayTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	protected function setUp()
25 25
 	{
26
-		$dir = __DIR__ . DIRECTORY_SEPARATOR . 'testfiles';
27
-		$dir2 = __DIR__ . DIRECTORY_SEPARATOR . 'testowrite';
26
+		$dir = __DIR__.DIRECTORY_SEPARATOR.'testfiles';
27
+		$dir2 = __DIR__.DIRECTORY_SEPARATOR.'testowrite';
28 28
 
29 29
 		$conf = array( 'resource' => array( 'db' => array( 'host' => '127.0.0.1' ) ) );
30 30
 		$this->object = new \Aimeos\MW\Config\PHPArray( $conf, array( $dir, $dir2 ) );
@@ -44,34 +44,34 @@  discard block
 block discarded – undo
44 44
 	{
45 45
 		$this->assertEquals( '127.0.0.1', $this->object->get( 'resource/db/host' ) );
46 46
 
47
-		$x = $this->object->get( 'config/manager/default/select', 'defvalue1');
47
+		$x = $this->object->get( 'config/manager/default/select', 'defvalue1' );
48 48
 		$this->assertEquals( 'select11', $x );
49 49
 
50
-		$x = $this->object->get( 'config/provider/delivery/sh/select', 'defvalue2');
50
+		$x = $this->object->get( 'config/provider/delivery/sh/select', 'defvalue2' );
51 51
 		$this->assertEquals( 'select2', $x );
52 52
 
53
-		$x = $this->object->get( 'subconfig/default/subitem/a/aa', 'defvalue3');
53
+		$x = $this->object->get( 'subconfig/default/subitem/a/aa', 'defvalue3' );
54 54
 		$this->assertEquals( '111', $x );
55 55
 
56
-		$x = $this->object->get( 'subconfig/subsubconfig/default/subsubitem/aa/aaa', 'defvalue4');
56
+		$x = $this->object->get( 'subconfig/subsubconfig/default/subsubitem/aa/aaa', 'defvalue4' );
57 57
 		$this->assertEquals( '111', $x );
58 58
 
59
-		$x = $this->object->get( 'config/manager/default/select', 'defvalue5');
59
+		$x = $this->object->get( 'config/manager/default/select', 'defvalue5' );
60 60
 		$this->assertEquals( 'select11', $x );
61 61
 
62
-		$x = $this->object->get( 'subconfig/subsubconfig/default/subsubitem/aa/aaa', 'defvalue6');
62
+		$x = $this->object->get( 'subconfig/subsubconfig/default/subsubitem/aa/aaa', 'defvalue6' );
63 63
 		$this->assertEquals( '111', $x );
64 64
 
65
-		$x = $this->object->get( 'subconfig/default/subitem/a/aa', 'defvalue7');
65
+		$x = $this->object->get( 'subconfig/default/subitem/a/aa', 'defvalue7' );
66 66
 		$this->assertEquals( '111', $x );
67 67
 
68
-		$x = $this->object->get( 'subconfig/default/subitem/a/bb', 'defvalue8');
68
+		$x = $this->object->get( 'subconfig/default/subitem/a/bb', 'defvalue8' );
69 69
 		$this->assertEquals( 'defvalue8', $x );
70 70
 
71
-		$x = $this->object->get( 'nonsubconfig', 'defvalue9');
71
+		$x = $this->object->get( 'nonsubconfig', 'defvalue9' );
72 72
 		$this->assertEquals( 'defvalue9', $x );
73 73
 
74
-		$x = $this->object->get( 'subconfig', 'defvalue10');
74
+		$x = $this->object->get( 'subconfig', 'defvalue10' );
75 75
 		$this->assertInternalType( 'array', $x );
76 76
 	}
77 77
 
@@ -81,13 +81,13 @@  discard block
 block discarded – undo
81 81
 
82 82
 		$this->assertEquals(
83 83
 			array(
84
-				'subitem' => array (
84
+				'subitem' => array(
85 85
 					'a' => array(
86 86
 						'aa' => '111',
87 87
 					),
88 88
 				),
89 89
 				'subbla' => array(
90
-					'b' => array (
90
+					'b' => array(
91 91
 						'bb' => '22',
92 92
 					),
93 93
 				),
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Translation/NoneTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
 
110 110
 		$lcList = array(
111 111
 			0 => array(
112
-				'am', 'ar','bh', 'fil', 'fr', 'gun', 'hi', 'ln', 'lv','mg', 'nso', 'xbr', 'ti', 'wa', 'pt_BR'
112
+				'am', 'ar', 'bh', 'fil', 'fr', 'gun', 'hi', 'ln', 'lv', 'mg', 'nso', 'xbr', 'ti', 'wa', 'pt_BR'
113 113
 			),
114 114
 			1 => array(
115 115
 				'af', 'az', 'bn', 'bg', 'ca', 'da', 'de', 'el', 'en', 'eo', 'es',
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Translation/SerializedArrayTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 		$ds = DIRECTORY_SEPARATOR;
27 27
 
28 28
 		$translationSources = array(
29
-			'testDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case1' ),
30
-			'otherTestDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case2' ), // no file for ru_XX!
31
-			'thirdtestDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case3' ),
29
+			'testDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case1' ),
30
+			'otherTestDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case2' ), // no file for ru_XX!
31
+			'thirdtestDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case3' ),
32 32
 		);
33 33
 
34 34
 		$this->object = new \Aimeos\MW\Translation\SerializedArray( $translationSources, 'ru_XX' );
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	public function testAbstractGetTranslationFileFallback()
88 88
 	{
89 89
 		$ds = DIRECTORY_SEPARATOR;
90
-		$srcs = array( 'testDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case1' ) );
90
+		$srcs = array( 'testDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case1' ) );
91 91
 		$object = new \Aimeos\MW\Translation\SerializedArray( $srcs, 'de_DE' );
92 92
 
93 93
 		$this->assertEquals( 'plural 1 translation', $object->dn( 'testDomain', 'File', 'Files', 5 ) );
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	public function testAbstractGetTranslationFileFallbackNoFile()
100 100
 	{
101 101
 		$ds = DIRECTORY_SEPARATOR;
102
-		$srcs = array( 'otherTestDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case2' ) );
102
+		$srcs = array( 'otherTestDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case2' ) );
103 103
 		$object = new \Aimeos\MW\Translation\SerializedArray( $srcs, 'de' );
104 104
 
105 105
 		$this->assertEquals( 'Test default return', $object->dt( 'otherTestDomain', 'Test default return' ) );
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	public function testAbstractGetTranslationFileFallbackInvalidLocale()
110 110
 	{
111 111
 		$ds = DIRECTORY_SEPARATOR;
112
-		$srcs = array( 'otherTestDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case2' ) );
112
+		$srcs = array( 'otherTestDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case2' ) );
113 113
 		$object = new \Aimeos\MW\Translation\SerializedArray( $srcs, 'xx_XX' );
114 114
 
115 115
 		$this->assertEquals( 'Test default return', $object->dt( 'otherTestDomain', 'Test default return' ) );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
 		$lcList = array(
124 124
 			0 => array(
125
-				'am', 'ar','bh', 'fil', 'fr', 'gun', 'hi', 'ln', 'lv','mg', 'nso', 'xbr', 'ti', 'wa', 'pt_BR'
125
+				'am', 'ar', 'bh', 'fil', 'fr', 'gun', 'hi', 'ln', 'lv', 'mg', 'nso', 'xbr', 'ti', 'wa', 'pt_BR'
126 126
 			),
127 127
 			1 => array(
128 128
 				'af', 'az', 'bn', 'bg', 'ca', 'da', 'de', 'el', 'en', 'eo', 'es',
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		);
137 137
 
138 138
 		$ds = DIRECTORY_SEPARATOR;
139
-		$srcs = array( 'testDomain' => array( __DIR__ . $ds . 'testfiles' . $ds . 'case1' ) );
139
+		$srcs = array( 'testDomain' => array( __DIR__.$ds.'testfiles'.$ds.'case1' ) );
140 140
 
141 141
 		foreach( $lcList as $index => $lcs )
142 142
 		{
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Observer/Listener/StandardTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 	{
39 39
 		$p = new TestPublisher();
40 40
 
41
-		$this->object->register($p);
41
+		$this->object->register( $p );
42 42
 	}
43 43
 
44 44
 	public function testUpdate()
45 45
 	{
46 46
 		$p = new TestPublisher();
47 47
 
48
-		$this->object->update($p, 'test');
48
+		$this->object->update( $p, 'test' );
49 49
 	}
50 50
 }
51 51
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 	public function update( \Aimeos\MW\Observer\Publisher\Iface $p, $action, $value = null )
60 60
 	{
61
-		if ($action == 'test') {
61
+		if( $action == 'test' ) {
62 62
 			return false;
63 63
 		}
64 64
 	}
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Tree/Node/DBNestedSetTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,19 +52,19 @@
 block discarded – undo
52 52
 
53 53
 	public function testSetId()
54 54
 	{
55
-		$this->object->setId(null);
55
+		$this->object->setId( null );
56 56
 		$this->assertEquals( true, $this->object->isModified() );
57 57
 	}
58 58
 
59 59
 	public function testGetChild()
60 60
 	{
61
-		$this->setExpectedException('\\Aimeos\\MW\\Tree\\Exception');
62
-		$this->object->getChild(null);
61
+		$this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' );
62
+		$this->object->getChild( null );
63 63
 	}
64 64
 
65 65
 	public function testMagicGet()
66 66
 	{
67
-		$this->setExpectedException('\\Aimeos\\MW\\Tree\\Exception');
67
+		$this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' );
68 68
 		$this->object->notDefined;
69 69
 	}
70 70
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/DB/DBALTest.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 		$conn = $this->object->acquire();
218 218
 
219 219
 		$value = "(\\')";
220
-		$sqlinsert = str_replace( ':value', '\'' . $conn->escape( $value ) . '\'', $sqlinsert );
220
+		$sqlinsert = str_replace( ':value', '\''.$conn->escape( $value ).'\'', $sqlinsert );
221 221
 		$stmt = $conn->create( $sqlinsert );
222 222
 		$stmt->execute()->finish();
223 223
 
@@ -245,12 +245,12 @@  discard block
 block discarded – undo
245 245
 
246 246
 	public function testStmtSimpleBindParamType()
247 247
 	{
248
-		$sqlinsert2 =  'INSERT INTO "mw_unit_test" ("name") VALUES (?)';
248
+		$sqlinsert2 = 'INSERT INTO "mw_unit_test" ("name") VALUES (?)';
249 249
 
250 250
 		$conn = $this->object->acquire();
251 251
 
252 252
 		$stmt2 = $conn->create( $sqlinsert2 );
253
-		$stmt2->bind( 1, 0.15, 123);
253
+		$stmt2->bind( 1, 0.15, 123 );
254 254
 		$result = $stmt2->execute();
255 255
 		$rows = $result->affectedRows();
256 256
 		$result->finish();
@@ -269,13 +269,13 @@  discard block
 block discarded – undo
269 269
 		try {
270 270
 			$stmt = $conn->create( $sqlinsert );
271 271
 			$stmt->execute();
272
-		} catch ( \Aimeos\MW\DB\Exception $de ) {
272
+		} catch( \Aimeos\MW\DB\Exception $de ) {
273 273
 			$this->object->release( $conn );
274 274
 			return;
275 275
 		}
276 276
 
277 277
 		$this->object->release( $conn );
278
-		$this->fail('An expected exception has not been raised');
278
+		$this->fail( 'An expected exception has not been raised' );
279 279
 	}
280 280
 
281 281
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
 	public function testWrongFieldType()
324 324
 	{
325
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
325
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
326 326
 		$sqlinsert = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
327 327
 
328 328
 		$conn = $this->object->acquire();
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 			$stmt->bind( 1, 1 );
334 334
 			$stmt->bind( 2, 'test', 123 );
335 335
 		}
336
-		catch ( \Aimeos\MW\DB\Exception $e )
336
+		catch( \Aimeos\MW\DB\Exception $e )
337 337
 		{
338 338
 			$this->object->release( $conn );
339 339
 			throw $e;
@@ -357,13 +357,13 @@  discard block
 block discarded – undo
357 357
 
358 358
 		$conn = $this->object->acquire();
359 359
 
360
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
360
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
361 361
 
362 362
 		try
363 363
 		{
364 364
 			$conn->create( $sql )->execute()->finish();
365 365
 		}
366
-		catch ( \Aimeos\MW\DB\Exception $e )
366
+		catch( \Aimeos\MW\DB\Exception $e )
367 367
 		{
368 368
 			$this->object->release( $conn );
369 369
 			throw $e;
@@ -375,13 +375,13 @@  discard block
 block discarded – undo
375 375
 	{
376 376
 		$conn = $this->object->acquire();
377 377
 
378
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
378
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
379 379
 
380 380
 		try
381 381
 		{
382 382
 			$conn->create( 'SELECT *' )->execute()->finish();
383 383
 		}
384
-		catch ( \Aimeos\MW\DB\Exception $e )
384
+		catch( \Aimeos\MW\DB\Exception $e )
385 385
 		{
386 386
 			$this->object->release( $conn );
387 387
 			throw $e;
@@ -395,13 +395,13 @@  discard block
 block discarded – undo
395 395
 
396 396
 		$conn = $this->object->acquire();
397 397
 
398
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
398
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
399 399
 
400 400
 		try
401 401
 		{
402 402
 			$conn->create( $sql, 123 );
403 403
 		}
404
-		catch (\Aimeos\MW\DB\Exception $e)
404
+		catch( \Aimeos\MW\DB\Exception $e )
405 405
 		{
406 406
 			$this->object->release( $conn );
407 407
 			throw $e;
@@ -411,21 +411,21 @@  discard block
 block discarded – undo
411 411
 
412 412
 	public function testDBALException()
413 413
 	{
414
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
414
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
415 415
 		$conn = new TestForDBALException();
416
-		$this->object->release($conn);
416
+		$this->object->release( $conn );
417 417
 	}
418 418
 
419 419
 
420 420
 	public function testDBFactory()
421 421
 	{
422
-		$this->assertInstanceOf('\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object);
422
+		$this->assertInstanceOf( '\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object );
423 423
 	}
424 424
 
425 425
 
426 426
 	public function testFactoryFail()
427 427
 	{
428
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
428
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
429 429
 		\Aimeos\MW\DB\Factory::createManager( \TestHelperMw::getConfig(), 'notDefined' );
430 430
 	}
431 431
 }
@@ -434,11 +434,11 @@  discard block
 block discarded – undo
434 434
 
435 435
 class TestForDBALException implements \Aimeos\MW\DB\Connection\Iface
436 436
 {
437
-	public function create($sql, $type = \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE)
437
+	public function create( $sql, $type = \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE )
438 438
 	{
439 439
 	}
440 440
 
441
-	public function escape($data)
441
+	public function escape( $data )
442 442
 	{
443 443
 	}
444 444
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,10 +266,13 @@
 block discarded – undo
266 266
 
267 267
 		$conn = $this->object->acquire();
268 268
 
269
-		try {
269
+		try
270
+		{
270 271
 			$stmt = $conn->create( $sqlinsert );
271 272
 			$stmt->execute();
272
-		} catch ( \Aimeos\MW\DB\Exception $de ) {
273
+		}
274
+		catch ( \Aimeos\MW\DB\Exception $de )
275
+		{
273 276
 			$this->object->release( $conn );
274 277
 			return;
275 278
 		}
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/DB/PDOTest.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		$conn = $this->object->acquire();
209 209
 
210 210
 		$value = "(\\')";
211
-		$sqlinsert = str_replace( ':value', '\'' . $conn->escape( $value ) . '\'', $sqlinsert );
211
+		$sqlinsert = str_replace( ':value', '\''.$conn->escape( $value ).'\'', $sqlinsert );
212 212
 		$stmt = $conn->create( $sqlinsert );
213 213
 		$stmt->execute()->finish();
214 214
 
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 
237 237
 	public function testStmtSimpleBindTwo()
238 238
 	{
239
-		$sqlinsert2 =  'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
239
+		$sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
240 240
 
241 241
 		$conn = $this->object->acquire();
242 242
 
243 243
 		$stmt2 = $conn->create( $sqlinsert2 );
244
-		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
244
+		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
245 245
 		$stmt2->bind( 2, 0.12 );
246 246
 		$stmt2->execute()->finish();
247 247
 
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
 
254 254
 	public function testStmtSimpleBindThree()
255 255
 	{
256
-		$sqlinsert3 =  'INSERT INTO "mw_unit_test" ("name", "id") VALUES (\'?te?st?\', ?)';
256
+		$sqlinsert3 = 'INSERT INTO "mw_unit_test" ("name", "id") VALUES (\'?te?st?\', ?)';
257 257
 
258 258
 		$conn = $this->object->acquire();
259 259
 
260 260
 		$stmt2 = $conn->create( $sqlinsert3 );
261
-		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
261
+		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
262 262
 		$stmt2->execute()->finish();
263 263
 
264 264
 		$this->object->release( $conn );
@@ -269,13 +269,13 @@  discard block
 block discarded – undo
269 269
 
270 270
 	public function testStmtSimpleBindParamType()
271 271
 	{
272
-		$sqlinsert2 =  'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
272
+		$sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
273 273
 
274 274
 		$conn = $this->object->acquire();
275 275
 
276 276
 		$stmt2 = $conn->create( $sqlinsert2 );
277
-		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
278
-		$stmt2->bind( 2, 0.15, 123);
277
+		$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
278
+		$stmt2->bind( 2, 0.15, 123 );
279 279
 		$result = $stmt2->execute();
280 280
 		$rows = $result->affectedRows();
281 281
 		$result->finish();
@@ -294,13 +294,13 @@  discard block
 block discarded – undo
294 294
 		try {
295 295
 			$stmt = $conn->create( $sqlinsert );
296 296
 			$stmt->execute();
297
-		} catch ( \Aimeos\MW\DB\Exception $de ) {
297
+		} catch( \Aimeos\MW\DB\Exception $de ) {
298 298
 			$this->object->release( $conn );
299 299
 			return;
300 300
 		}
301 301
 
302 302
 		$this->object->release( $conn );
303
-		$this->fail('An expected exception has not been raised');
303
+		$this->fail( 'An expected exception has not been raised' );
304 304
 	}
305 305
 
306 306
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
 	public function testWrongFieldType()
405 405
 	{
406
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
406
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
407 407
 		$sqlinsert = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
408 408
 
409 409
 		$conn = $this->object->acquire();
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 			$stmt->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
415 415
 			$stmt->bind( 2, 'test', 123 );
416 416
 		}
417
-		catch ( \Aimeos\MW\DB\Exception $e )
417
+		catch( \Aimeos\MW\DB\Exception $e )
418 418
 		{
419 419
 			$this->object->release( $conn );
420 420
 			throw $e;
@@ -438,13 +438,13 @@  discard block
 block discarded – undo
438 438
 
439 439
 		$conn = $this->object->acquire();
440 440
 
441
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
441
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
442 442
 
443 443
 		try
444 444
 		{
445 445
 			$conn->create( $sql )->execute()->finish();
446 446
 		}
447
-		catch ( \Aimeos\MW\DB\Exception $e )
447
+		catch( \Aimeos\MW\DB\Exception $e )
448 448
 		{
449 449
 			$this->object->release( $conn );
450 450
 			throw $e;
@@ -456,13 +456,13 @@  discard block
 block discarded – undo
456 456
 	{
457 457
 		$conn = $this->object->acquire();
458 458
 
459
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
459
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
460 460
 
461 461
 		try
462 462
 		{
463 463
 			$conn->create( 'SELECT *' )->execute()->finish();
464 464
 		}
465
-		catch ( \Aimeos\MW\DB\Exception $e )
465
+		catch( \Aimeos\MW\DB\Exception $e )
466 466
 		{
467 467
 			$this->object->release( $conn );
468 468
 			throw $e;
@@ -476,13 +476,13 @@  discard block
 block discarded – undo
476 476
 
477 477
 		$conn = $this->object->acquire();
478 478
 
479
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
479
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
480 480
 
481 481
 		try
482 482
 		{
483 483
 			$conn->create( $sql, 123 );
484 484
 		}
485
-		catch (\Aimeos\MW\DB\Exception $e)
485
+		catch( \Aimeos\MW\DB\Exception $e )
486 486
 		{
487 487
 			$this->object->release( $conn );
488 488
 			throw $e;
@@ -492,21 +492,21 @@  discard block
 block discarded – undo
492 492
 
493 493
 	public function testPDOException()
494 494
 	{
495
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
495
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
496 496
 		$conn = new TestForPDOException();
497
-		$this->object->release($conn);
497
+		$this->object->release( $conn );
498 498
 	}
499 499
 
500 500
 
501 501
 	public function testDBFactory()
502 502
 	{
503
-		$this->assertInstanceOf('\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object);
503
+		$this->assertInstanceOf( '\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object );
504 504
 	}
505 505
 
506 506
 
507 507
 	public function testFactoryFail()
508 508
 	{
509
-		$this->setExpectedException('\\Aimeos\\MW\\DB\\Exception');
509
+		$this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' );
510 510
 		\Aimeos\MW\DB\Factory::createManager( \TestHelperMw::getConfig(), 'notDefined' );
511 511
 	}
512 512
 }
@@ -515,11 +515,11 @@  discard block
 block discarded – undo
515 515
 
516 516
 class TestForPDOException implements \Aimeos\MW\DB\Connection\Iface
517 517
 {
518
-	public function create($sql, $type = \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE)
518
+	public function create( $sql, $type = \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE )
519 519
 	{
520 520
 	}
521 521
 
522
-	public function escape($data)
522
+	public function escape( $data )
523 523
 	{
524 524
 	}
525 525
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,10 +266,13 @@
 block discarded – undo
266 266
 
267 267
 		$conn = $this->object->acquire();
268 268
 
269
-		try {
269
+		try
270
+		{
270 271
 			$stmt = $conn->create( $sqlinsert );
271 272
 			$stmt->execute();
272
-		} catch ( \Aimeos\MW\DB\Exception $de ) {
273
+		}
274
+		catch ( \Aimeos\MW\DB\Exception $de )
275
+		{
273 276
 			$this->object->release( $conn );
274 277
 			return;
275 278
 		}
Please login to merge, or discard this patch.