Passed
Pull Request — master (#181)
by Simon
04:48
created
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.
controller/common/src/Controller/Common/Media/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
 					$fs->rm( $preview );
149 149
 				}
150 150
 			}
151
-			catch( \Exception $e ) { ; } // continue if removing file fails
151
+			catch( \Exception $e ) {; } // continue if removing file fails
152 152
 		}
153 153
 
154 154
 		return $item->setUrl( '' )->setPreviews( [] )->deletePropertyItems( $item->getPropertyItems() );
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
 		if( $media instanceof \Aimeos\MW\Media\Image\Iface )
55 55
 		{
56 56
 			$item = $this->addImages( $item, $media, null, $fsname );
57
-		}
58
-		else
57
+		} else
59 58
 		{
60 59
 			$filepath = $this->getFilePath( $file->getClientFilename(), 'files', $mimetype );
61 60
 
@@ -106,7 +105,9 @@  discard block
 block discarded – undo
106 105
 					$fs->copy( $preview, $newPath );
107 106
 					$previews[$size] = $newPath;
108 107
 				}
109
-				catch( \Aimeos\MW\Filesystem\Exception $e ) {} // mime icons can't be copied
108
+				catch( \Aimeos\MW\Filesystem\Exception $e )
109
+				{
110
+} // mime icons can't be copied
110 111
 			}
111 112
 		}
112 113
 
@@ -148,7 +149,9 @@  discard block
 block discarded – undo
148 149
 					$fs->rm( $preview );
149 150
 				}
150 151
 			}
151
-			catch( \Exception $e ) { ; } // continue if removing file fails
152
+			catch( \Exception $e )
153
+			{
154
+; } // continue if removing file fails
152 155
 		}
153 156
 
154 157
 		return $item->setUrl( '' )->setPreviews( [] )->deletePropertyItems( $item->getPropertyItems() );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Config/Decorator/Memory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,8 +93,7 @@
 block discarded – undo
93 93
 			if( isset( $this->negCache[$name] ) ) {
94 94
 				unset( $this->negCache[$name] );
95 95
 			}
96
-		}
97
-		else
96
+		} else
98 97
 		{
99 98
 			$this->negCache[$name] = true;
100 99
 		}
Please login to merge, or discard this patch.