Passed
Push — master ( 1d5b74...b7a41a )
by Aimeos
04:54
created
lib/mshoplib/setup/unitperf/CatalogAddPerfData.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 				for( $i = 0; $i < $numCatPerLevel; $i++ ) {
80 80
 					$treeFcn( $parents, $catItem->getId(), $numCatPerLevel, $level - 1, $catLabel . '-' . ( $i + 1 ), $i );
81 81
 				}
82
-			}
83
-			else
82
+			} else
84 83
 			{
85 84
 				$fcn = function( array $parents, $catLabel ) {
86 85
 
@@ -139,9 +138,12 @@  discard block
 block discarded – undo
139 138
 
140 139
 		while( true )
141 140
 		{
142
-			try {
141
+			try
142
+			{
143 143
 				return $catalogManager->insertItem( $item, $parentId );
144
-			} catch( \Aimeos\MW\DB\Exception $e ) {
144
+			}
145
+			catch( \Aimeos\MW\DB\Exception $e )
146
+			{
145 147
 				if( $e->getCode() !== 40001 ) { throw $e; } // transaction deadlock
146 148
 			}
147 149
 		}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Payment/PayPalExpress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -720,7 +720,7 @@
 block discarded – undo
720 720
 					$lastPos++;
721 721
 				}
722 722
 			}
723
-			catch( \Exception $e ) { ; } // If no delivery service is available
723
+			catch( \Exception $e ) {; } // If no delivery service is available
724 724
 		}
725 725
 
726 726
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Criteria/Expression/Combine/SQLTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@
 block discarded – undo
75 75
 		$expected = " NOT ( ( list IN ('a','b','c') AND string LIKE '%value%' ESCAPE '#' ) OR ( float < 0.1 AND int > 10 ) )";
76 76
 		$this->assertEquals( $expected, $test->toSource( $types ) );
77 77
 
78
-		$obj = new \Aimeos\MW\Criteria\Expression\Combine\SQL('&&', []);
79
-		$this->assertEquals('', $obj->toSource($types));
78
+		$obj = new \Aimeos\MW\Criteria\Expression\Combine\SQL( '&&', [] );
79
+		$this->assertEquals( '', $obj->toSource( $types ) );
80 80
 
81 81
 		$this->setExpectedException( \Aimeos\MW\Common\Exception::class );
82
-		new \Aimeos\MW\Criteria\Expression\Combine\SQL('', []);
82
+		new \Aimeos\MW\Criteria\Expression\Combine\SQL( '', [] );
83 83
 	}
84 84
 }
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/DB/DBALTest.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -284,10 +284,13 @@
 block discarded – undo
284 284
 
285 285
 		$conn = $this->object->acquire();
286 286
 
287
-		try {
287
+		try
288
+		{
288 289
 			$stmt = $conn->create( $sqlinsert );
289 290
 			$stmt->execute();
290
-		} catch( \Aimeos\MW\DB\Exception $de ) {
291
+		}
292
+		catch( \Aimeos\MW\DB\Exception $de )
293
+		{
291 294
 			$this->object->release( $conn );
292 295
 			return;
293 296
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Translation/SerializedArray.php 1 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/DB/Result/PDO.php 1 patch
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,9 +42,12 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public function affectedRows()
44 44
 	{
45
-		try {
45
+		try
46
+		{
46 47
 			return $this->statement->rowCount();
47
-		} catch( \PDOException $e ) {
48
+		}
49
+		catch( \PDOException $e )
50
+		{
48 51
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
49 52
 		}
50 53
 	}
@@ -59,9 +62,12 @@  discard block
 block discarded – undo
59 62
 	 */
60 63
 	public function fetch( $style = \Aimeos\MW\DB\Result\Base::FETCH_ASSOC )
61 64
 	{
62
-		try {
65
+		try
66
+		{
63 67
 			return $this->statement->fetch( $style ? \PDO::FETCH_ASSOC : \PDO::FETCH_NUM );
64
-		} catch( \PDOException $e ) {
68
+		}
69
+		catch( \PDOException $e )
70
+		{
65 71
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
66 72
 		}
67 73
 	}
@@ -75,9 +81,12 @@  discard block
 block discarded – undo
75 81
 	 */
76 82
 	public function finish()
77 83
 	{
78
-		try {
84
+		try
85
+		{
79 86
 			$this->statement->closeCursor();
80
-		} catch( \PDOException $e ) {
87
+		}
88
+		catch( \PDOException $e )
89
+		{
81 90
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
82 91
 		}
83 92
 
@@ -92,9 +101,12 @@  discard block
 block discarded – undo
92 101
 	 */
93 102
 	public function nextResult()
94 103
 	{
95
-		try {
104
+		try
105
+		{
96 106
 			return $this->statement->nextRowset();
97
-		} catch( \PDOException $e ) {
107
+		}
108
+		catch( \PDOException $e )
109
+		{
98 110
 			return false;
99 111
 		}
100 112
 	}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Connection/PDO.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,8 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function create( $sql, $type = \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE )
81 81
 	{
82
-		try {
82
+		try
83
+		{
83 84
 			switch( $type )
84 85
 			{
85 86
 				case \Aimeos\MW\DB\Connection\Base::TYPE_SIMPLE:
@@ -89,7 +90,9 @@  discard block
 block discarded – undo
89 90
 				default:
90 91
 					throw new \Aimeos\MW\DB\Exception( sprintf( 'Invalid value "%1$d" for statement type', $type ) );
91 92
 			}
92
-		} catch( \PDOException $e ) {
93
+		}
94
+		catch( \PDOException $e )
95
+		{
93 96
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
94 97
 		}
95 98
 	}
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/DB/PDOTest.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -284,10 +284,13 @@
 block discarded – undo
284 284
 
285 285
 		$conn = $this->object->acquire();
286 286
 
287
-		try {
287
+		try
288
+		{
288 289
 			$stmt = $conn->create( $sqlinsert );
289 290
 			$stmt->execute();
290
-		} catch( \Aimeos\MW\DB\Exception $de ) {
291
+		}
292
+		catch( \Aimeos\MW\DB\Exception $de )
293
+		{
291 294
 			$this->object->release( $conn );
292 295
 			return;
293 296
 		}
Please login to merge, or discard this patch.