Passed
Pull Request — master (#181)
by Simon
04:48
created
lib/mwlib/src/MW/MQueue/Standard.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,9 +32,12 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		parent::__construct( $config );
34 34
 
35
-		try {
35
+		try
36
+		{
36 37
 			$this->conn = $this->createConnection();
37
-		} catch( \Aimeos\MW\DB\Exception $e ) {
38
+		}
39
+		catch( \Aimeos\MW\DB\Exception $e )
40
+		{
38 41
 			throw new \Aimeos\MW\MQueue\Exception( $e->getMessage() );
39 42
 		}
40 43
 	}
@@ -85,8 +88,7 @@  discard block
 block discarded – undo
85 88
 		{
86 89
 			$dsn .= isset( $host ) ? ';host=' . $host : '';
87 90
 			$dsn .= isset( $port ) ? ';port=' . $port : '';
88
-		}
89
-		else
91
+		} else
90 92
 		{
91 93
 			$dsn .= ';unix_socket=' . $sock;
92 94
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Tree/Manager/DBNestedSet.php 1 patch
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.
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.
lib/mwlib/src/MW/DB/Manager/PDO.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,8 @@  discard block
 block discarded – undo
88 88
 			return array_pop( $this->connections[$name] );
89 89
 
90 90
 		}
91
-		catch( \PDOException $e ) {
91
+		catch( \PDOException $e )
92
+		{
92 93
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
93 94
 		}
94 95
 	}
@@ -131,8 +132,7 @@  discard block
 block discarded – undo
131 132
 		{
132 133
 			$dsn .= isset( $host ) ? ';host=' . $host : '';
133 134
 			$dsn .= isset( $port ) ? ';port=' . $port : '';
134
-		}
135
-		else
135
+		} else
136 136
 		{
137 137
 			$dsn .= ';unix_socket=' . $sock;
138 138
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddTypeData.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,10 +100,14 @@
 block discarded – undo
100 100
 				$type->setLabel( $dataset['label'] );
101 101
 				$type->setStatus( $dataset['status'] );
102 102
 
103
-				try {
103
+				try
104
+				{
104 105
 					$domainManager->saveItem( $type );
105 106
 					$num++;
106
-				} catch( \Exception $e ) { ; } // if type was already available
107
+				}
108
+				catch( \Exception $e )
109
+				{
110
+; } // if type was already available
107 111
 			}
108 112
 
109 113
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 				try {
101 101
 					$domainManager->saveItem( $type );
102 102
 					$num++;
103
-				} catch( \Exception $e ) { ; } // if type was already available
103
+				} catch( \Exception $e ) {; } // if type was already available
104 104
 			}
105 105
 
106 106
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
lib/mshoplib/setup/StockMigrateProductcode.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 				{
73 73
 					$this->execute( $stmt );
74 74
 					$this->status( 'done' );
75
-				}
76
-				else
75
+				} else
77 76
 				{
78 77
 					$this->status( 'OK' );
79 78
 				}
@@ -86,8 +85,7 @@  discard block
 block discarded – undo
86 85
 			{
87 86
 				$this->executeList( $this->updates );
88 87
 				$this->status( 'done' );
89
-			}
90
-			else
88
+			} else
91 89
 			{
92 90
 				$this->status( 'OK' );
93 91
 			}
@@ -101,8 +99,7 @@  discard block
 block discarded – undo
101 99
 				{
102 100
 					$this->execute( $stmt );
103 101
 					$this->status( 'done' );
104
-				}
105
-				else
102
+				} else
106 103
 				{
107 104
 					$this->status( 'OK' );
108 105
 				}
@@ -114,8 +111,7 @@  discard block
 block discarded – undo
114 111
 			{
115 112
 				$this->execute( $this->column );
116 113
 				$this->status( 'done' );
117
-			}
118
-			else
114
+			} else
119 115
 			{
120 116
 				$this->status( 'OK' );
121 117
 			}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Filesystem/Standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,9 +104,12 @@
 block discarded – undo
104 104
 	 */
105 105
 	public function scan( $path = null )
106 106
 	{
107
-		try {
107
+		try
108
+		{
108 109
 			return new \DirectoryIterator( $this->resolve( $path ) );
109
-		} catch( \Exception $e ) {
110
+		}
111
+		catch( \Exception $e )
112
+		{
110 113
 			throw new Exception( $e->getMessage(), 0, $e );
111 114
 		}
112 115
 	}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Expression/Sort/SQL.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -189,12 +189,10 @@
 block discarded – undo
189 189
 			}
190 190
 
191 191
 			return \Aimeos\MW\DB\Statement\Base::PARAM_STR;
192
-		}
193
-		else if( strpos( $item, '.' ) !== false )
192
+		} else if( strpos( $item, '.' ) !== false )
194 193
 		{
195 194
 			return \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT;
196
-		}
197
-		else if( ctype_digit( $item ) !== false )
195
+		} else if( ctype_digit( $item ) !== false )
198 196
 		{
199 197
 			return \Aimeos\MW\DB\Statement\Base::PARAM_INT;
200 198
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/StockAddTypeDomainValue.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
 		{
61 61
 			$this->execute( $this->sql );
62 62
 			$this->status( 'done' );
63
-		}
64
-		else
63
+		} else
65 64
 		{
66 65
 			$this->status( 'OK' );
67 66
 		}
Please login to merge, or discard this patch.