Passed
Push — master ( 47e37b...2360ce )
by Aimeos
05:11
created
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/DB/DBALTest.php 2 patches
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.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -256,15 +256,15 @@  discard block
 block discarded – undo
256 256
 
257 257
 	public function testStmtSimpleInvalidBindParamType()
258 258
 	{
259
-		$sqlinsert2 =  'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
259
+		$sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)';
260 260
 
261 261
 		$conn = $this->object->acquire();
262 262
 
263 263
 		try
264 264
 		{
265 265
 			$stmt2 = $conn->create( $sqlinsert2 );
266
-			$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
267
-			$stmt2->bind( 2, 0.15, 123);
266
+			$stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
267
+			$stmt2->bind( 2, 0.15, 123 );
268 268
 			$stmt2->execute();
269 269
 		}
270 270
 		catch( \Aimeos\MW\DB\Exception $de )
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 		}
275 275
 
276 276
 		$this->object->release( $conn );
277
-		$this->fail('An expected exception has not been raised');
277
+		$this->fail( 'An expected exception has not been raised' );
278 278
 	}
279 279
 
280 280
 
@@ -287,13 +287,13 @@  discard block
 block discarded – undo
287 287
 		try {
288 288
 			$stmt = $conn->create( $sqlinsert );
289 289
 			$stmt->execute();
290
-		} catch ( \Aimeos\MW\DB\Exception $de ) {
290
+		} catch( \Aimeos\MW\DB\Exception $de ) {
291 291
 			$this->object->release( $conn );
292 292
 			return;
293 293
 		}
294 294
 
295 295
 		$this->object->release( $conn );
296
-		$this->fail('An expected exception has not been raised');
296
+		$this->fail( 'An expected exception has not been raised' );
297 297
 	}
298 298
 
299 299
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 			$stmt->bind( 2, 'test', 123 );
353 353
 			$stmt->execute();
354 354
 		}
355
-		catch ( \Aimeos\MW\DB\Exception $e )
355
+		catch( \Aimeos\MW\DB\Exception $e )
356 356
 		{
357 357
 			$this->object->release( $conn );
358 358
 			throw $e;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 		{
383 383
 			$conn->create( $sql )->execute()->finish();
384 384
 		}
385
-		catch ( \Aimeos\MW\DB\Exception $e )
385
+		catch( \Aimeos\MW\DB\Exception $e )
386 386
 		{
387 387
 			$this->object->release( $conn );
388 388
 			throw $e;
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 		{
401 401
 			$conn->create( 'SELECT *' )->execute()->finish();
402 402
 		}
403
-		catch ( \Aimeos\MW\DB\Exception $e )
403
+		catch( \Aimeos\MW\DB\Exception $e )
404 404
 		{
405 405
 			$this->object->release( $conn );
406 406
 			throw $e;
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 		{
421 421
 			$conn->create( $sql, 123 );
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;
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 
440 440
 	public function testDBFactory()
441 441
 	{
442
-		$this->assertInstanceOf(\Aimeos\MW\DB\Manager\Iface::class, $this->object);
442
+		$this->assertInstanceOf( \Aimeos\MW\DB\Manager\Iface::class, $this->object );
443 443
 	}
444 444
 
445 445
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Setup/Manager/tasks/OneTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 	public function getPostDependencies()
15 15
 	{
16
-		return array( 'TwoTask');
16
+		return array( 'TwoTask' );
17 17
 	}
18 18
 
19 19
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Logger/ErrorlogTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
 		ini_set( "error_log", "error.log" );
74 74
 
75
-		$this->object = new \Aimeos\MW\Logger\Errorlog( \Aimeos\MW\Logger\Base::DEBUG, array('test') );
75
+		$this->object = new \Aimeos\MW\Logger\Errorlog( \Aimeos\MW\Logger\Base::DEBUG, array( 'test' ) );
76 76
 		$this->object->log( 'info test', \Aimeos\MW\Logger\Base::INFO, 'info' );
77 77
 
78 78
 		ini_restore( "error_log" );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Config/Base.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 
25 25
 
26 26
 	/**
27
-	* Includes config files using a simple caching.
28
-	*
29
-	* @param string $file Path and file name of a config file
30
-	* @return array Value of the requested config file
31
-	**/
27
+	 * Includes config files using a simple caching.
28
+	 *
29
+	 * @param string $file Path and file name of a config file
30
+	 * @return array Value of the requested config file
31
+	 **/
32 32
 	protected function includeFile( $file )
33 33
 	{
34 34
 		if( !isset( $this->includeCache[$file] ) ) {
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Translation/SerializedArray.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
 		{
67 67
 			foreach( $this->getTranslations( $domain ) as $content )
68 68
 			{
69
-				if ( isset( $content[$string][0] ) && is_array( $content[$string] ) ) {
69
+				if( isset( $content[$string][0] ) && is_array( $content[$string] ) ) {
70 70
 					return $content[$string][0];
71 71
 				}
72 72
 
73
-				if ( isset( $content[$string] ) && is_string( $content[$string] ) ) {
73
+				if( isset( $content[$string] ) && is_string( $content[$string] ) ) {
74 74
 					return $content[$string];
75 75
 				}
76 76
 			}
77 77
 		}
78
-		catch( \Exception $e ) { ; } // no translation found
78
+		catch( \Exception $e ) {; } // no translation found
79 79
 
80 80
 		return (string) $string;
81 81
 	}
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
 		{
100 100
 			foreach( $this->getTranslations( $domain ) as $content )
101 101
 			{
102
-				if ( isset( $content[$singular][$index] ) && is_array( $content[$singular] ) ) {
102
+				if( isset( $content[$singular][$index] ) && is_array( $content[$singular] ) ) {
103 103
 					return $content[$singular][$index];
104 104
 				}
105 105
 			}
106 106
 		}
107
-		catch( \Exception $e ) { ; } // no translation found
107
+		catch( \Exception $e ) {; } // no translation found
108 108
 
109 109
 		if( $index > 0 ) {
110 110
 			return (string) $plural;
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,9 @@  discard block
 block discarded – undo
75 75
 				}
76 76
 			}
77 77
 		}
78
-		catch( \Exception $e ) { ; } // no translation found
78
+		catch( \Exception $e )
79
+		{
80
+; } // no translation found
79 81
 
80 82
 		return (string) $string;
81 83
 	}
@@ -104,7 +106,9 @@  discard block
 block discarded – undo
104 106
 				}
105 107
 			}
106 108
 		}
107
-		catch( \Exception $e ) { ; } // no translation found
109
+		catch( \Exception $e )
110
+		{
111
+; } // no translation found
108 112
 
109 113
 		if( $index > 0 ) {
110 114
 			return (string) $plural;
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Tree/Manager/DBNestedSet.php 2 patches
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -201,8 +201,7 @@  discard block
 block discarded – undo
201 201
 			if( $level === \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ) {
202 202
 				return $node;
203 203
 			}
204
-		}
205
-		else
204
+		} else
206 205
 		{
207 206
 			$node = $this->getNodeById( $id );
208 207
 
@@ -276,15 +275,13 @@  discard block
 block discarded – undo
276 275
 			$node->left = $refNode->left;
277 276
 			$node->right = $refNode->left + 1;
278 277
 			$node->level = $refNode->level;
279
-		}
280
-		else if( $parentId !== null )
278
+		} else if( $parentId !== null )
281 279
 		{
282 280
 			$parentNode = $this->getNode( $parentId, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE );
283 281
 			$node->left = $parentNode->right;
284 282
 			$node->right = $parentNode->right + 1;
285 283
 			$node->level = $parentNode->level + 1;
286
-		}
287
-		else
284
+		} else
288 285
 		{
289 286
 			$node->left = 1;
290 287
 			$node->right = 2;
@@ -375,8 +372,7 @@  discard block
 block discarded – undo
375 372
 				$moveNodeRightBegin = $node->left + $diff + 1;
376 373
 				$moveNodeRightEnd = $node->right + $diff;
377 374
 				$movesize = $refNode->left - $node->left - $diff;
378
-			}
379
-			else
375
+			} else
380 376
 			{
381 377
 				$moveNodeLeftBegin = $node->left;
382 378
 				$moveNodeLeftEnd = $node->right - 1;
@@ -387,8 +383,7 @@  discard block
 block discarded – undo
387 383
 
388 384
 			$closeNodeLeftBegin = $node->left + $diff;
389 385
 			$closeNodeRightBegin = $node->left + $diff;
390
-		}
391
-		else
386
+		} else
392 387
 		{
393 388
 			$refNode = $this->getNode( $newParentId, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE );
394 389
 
@@ -414,8 +409,7 @@  discard block
 block discarded – undo
414 409
 				$moveNodeRightBegin = $node->left + $diff + 1;
415 410
 				$moveNodeRightEnd = $node->right + $diff;
416 411
 				$movesize = $refNode->right - $node->left - $diff;
417
-			}
418
-			else
412
+			} else
419 413
 			{
420 414
 				$moveNodeLeftBegin = $node->left;
421 415
 				$moveNodeLeftEnd = $node->right - 1;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			$diff = $node->right - $node->left + 1;
161 161
 
162 162
 			$stmt = $conn->create( $this->config['move-left'] );
163
-			$stmt->bind( 1, -$diff, $this->searchConfig['left']['internaltype']);
163
+			$stmt->bind( 1, -$diff, $this->searchConfig['left']['internaltype'] );
164 164
 			$stmt->bind( 2, 0, $this->searchConfig['level']['internaltype'] );
165 165
 			$stmt->bind( 3, $node->right + 1, $this->searchConfig['left']['internaltype'] );
166 166
 			$stmt->bind( 4, 0x7FFFFFFF, $this->searchConfig['left']['internaltype'] );
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 				$search->getConditions(),
224 224
 				$condition->getConditions()
225 225
 			);
226
-			$search->setConditions( $search->combine('&&', $expr) );
226
+			$search->setConditions( $search->combine( '&&', $expr ) );
227 227
 		}
228 228
 
229 229
 		$types = $this->getSearchTypes( $this->searchConfig );
@@ -538,14 +538,14 @@  discard block
 block discarded – undo
538 538
 	 */
539 539
 	public function searchNodes( \Aimeos\MW\Criteria\Iface $search, $id = null )
540 540
 	{
541
-		$left =  1;
541
+		$left = 1;
542 542
 		$right = 0x7FFFFFFF;
543 543
 
544 544
 		if( $id !== null )
545 545
 		{
546 546
 			$node = $this->getNodeById( $id );
547 547
 
548
-			$left =  $node->left;
548
+			$left = $node->left;
549 549
 			$right = $node->right;
550 550
 		}
551 551
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 
622 622
 		$results = $this->searchNodes( $search );
623 623
 
624
-		foreach ( $results as $item ) {
624
+		foreach( $results as $item ) {
625 625
 			$result[$item->getId()] = $item;
626 626
 		}
627 627
 
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 	 */
734 734
 	protected function isChild( \Aimeos\MW\Tree\Node\Iface $node, \Aimeos\MW\Tree\Node\Iface $parent )
735 735
 	{
736
-		return $node->__get('left') > $parent->__get('left') && $node->__get('right') < $parent->__get('right');
736
+		return $node->__get( 'left' ) > $parent->__get( 'left' ) && $node->__get( 'right' ) < $parent->__get( 'right' );
737 737
 	}
738 738
 
739 739
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Connection/PDO.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 					throw new \Aimeos\MW\DB\Exception( sprintf( 'Invalid value "%1$d" for statement type', $type ) );
57 57
 			}
58 58
 		} catch( \PDOException $e ) {
59
-			throw new \Aimeos\MW\DB\Exception($e->getMessage(), $e->getCode(), $e->errorInfo );
59
+			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
60 60
 		}
61 61
 	}
62 62
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function create( $sql, $type = \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE )
47 47
 	{
48
-		try {
48
+		try
49
+		{
49 50
 			switch( $type )
50 51
 			{
51 52
 				case \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE:
@@ -55,7 +56,9 @@  discard block
 block discarded – undo
55 56
 				default:
56 57
 					throw new \Aimeos\MW\DB\Exception( sprintf( 'Invalid value "%1$d" for statement type', $type ) );
57 58
 			}
58
-		} catch( \PDOException $e ) {
59
+		}
60
+		catch( \PDOException $e )
61
+		{
59 62
 			throw new \Aimeos\MW\DB\Exception($e->getMessage(), $e->getCode(), $e->errorInfo );
60 63
 		}
61 64
 	}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Manager/DBAL.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,8 @@
 block discarded – undo
88 88
 			return array_pop( $this->connections[$name] );
89 89
 
90 90
 		}
91
-		catch( \Exception $e ) {
91
+		catch( \Exception $e )
92
+		{
92 93
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() );
93 94
 		}
94 95
 	}
Please login to merge, or discard this patch.