Passed
Push — master ( e7d28b...1359be )
by Aimeos
05:50
created
setup/MShopAddPluginData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,13 @@
 block discarded – undo
85 85
 				$item->setPosition( $dataset['position'] );
86 86
 			}
87 87
 
88
-			try {
88
+			try
89
+			{
89 90
 				$pluginManager->save( $item );
90
-			} catch( \Exception $e ) {; } // if plugin configuration was already available
91
+			}
92
+			catch( \Exception $e )
93
+			{
94
+; } // if plugin configuration was already available
91 95
 		}
92 96
 	}
93 97
 }
Please login to merge, or discard this patch.
tests/MW/MQueue/Queue/StandardTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
 				SELECT * FROM mw_mqueue_test WHERE queue = ? AND cname = ? AND rtime = ?
75 75
 				ORDER BY id LIMIT 1
76 76
 			';
77
-		}
78
-		else
77
+		} else
79 78
 		{
80 79
 			$config['sql']['reserve'] = '
81 80
 				UPDATE mw_mqueue_test SET cname = ?, rtime = ? WHERE id IN (
Please login to merge, or discard this patch.
tests/MShop/Plugin/Provider/ExceptionTest.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 	public function test()
28 28
 	{
29
-		try {
29
+		try
30
+		{
30 31
 			throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg', 13, null, $this->codes );
31 32
 		}
32 33
 		catch( \Aimeos\MShop\Plugin\Provider\Exception $mppe )
@@ -36,7 +37,8 @@  discard block
 block discarded – undo
36 37
 			$this->assertEquals( $this->codes, $mppe->getErrorCodes() );
37 38
 		}
38 39
 
39
-		try {
40
+		try
41
+		{
40 42
 			throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg2', 11 );
41 43
 		}
42 44
 		catch( \Aimeos\MShop\Plugin\Provider\Exception $e )
Please login to merge, or discard this patch.
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.
src/MW/DB/Manager/PDO.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -110,7 +110,8 @@  discard block
 block discarded – undo
110 110
 
111 111
 			return array_pop( $this->connections[$name] );
112 112
 		}
113
-		catch( \PDOException $e ) {
113
+		catch( \PDOException $e )
114
+		{
114 115
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
115 116
 		}
116 117
 	}
@@ -160,14 +161,12 @@  discard block
 block discarded – undo
160 161
 			{
161 162
 				$dsn .= 'Database=' . $dbase;
162 163
 				$dsn .= isset( $host ) ? ';Server=' . $host . ( isset( $port ) ? ',' . $port : '' ) : '';
163
-			}
164
-			elseif( $sock == null )
164
+			} elseif( $sock == null )
165 165
 			{
166 166
 				$dsn .= 'dbname=' . $dbase;
167 167
 				$dsn .= isset( $host ) ? ';host=' . $host : '';
168 168
 				$dsn .= isset( $port ) ? ';port=' . $port : '';
169
-			}
170
-			else
169
+			} else
171 170
 			{
172 171
 				$dsn .= 'dbname=' . $dbase . ';unix_socket=' . $sock;
173 172
 			}
Please login to merge, or discard this patch.
src/MW/DB/Result/DBAL.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,9 +50,12 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function affectedRows() : int
52 52
 	{
53
-		try {
53
+		try
54
+		{
54 55
 			return $this->result->rowCount();
55
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
56
+		}
57
+		catch( \Doctrine\DBAL\Driver\Exception $e )
58
+		{
56 59
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() );
57 60
 		}
58 61
 	}
@@ -90,9 +93,12 @@  discard block
 block discarded – undo
90 93
 	 */
91 94
 	public function finish() : Iface
92 95
 	{
93
-		try {
96
+		try
97
+		{
94 98
 			$this->result->free();
95
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
99
+		}
100
+		catch( \Doctrine\DBAL\Driver\Exception $e )
101
+		{
96 102
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() );
97 103
 		}
98 104
 
Please login to merge, or discard this patch.
src/MW/DB/Result/PDO.php 1 patch
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,9 +51,12 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function affectedRows() : int
53 53
 	{
54
-		try {
54
+		try
55
+		{
55 56
 			return $this->statement->rowCount();
56
-		} catch( \PDOException $e ) {
57
+		}
58
+		catch( \PDOException $e )
59
+		{
57 60
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
58 61
 		}
59 62
 	}
@@ -68,9 +71,12 @@  discard block
 block discarded – undo
68 71
 	 */
69 72
 	public function fetch( int $style = \Aimeos\MW\DB\Result\Base::FETCH_ASSOC ) : ?array
70 73
 	{
71
-		try {
74
+		try
75
+		{
72 76
 			return $this->statement->fetch( $style ? \PDO::FETCH_ASSOC : \PDO::FETCH_NUM ) ?: null;
73
-		} catch( \PDOException $e ) {
77
+		}
78
+		catch( \PDOException $e )
79
+		{
74 80
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
75 81
 		}
76 82
 	}
@@ -84,9 +90,12 @@  discard block
 block discarded – undo
84 90
 	 */
85 91
 	public function finish() : Iface
86 92
 	{
87
-		try {
93
+		try
94
+		{
88 95
 			$this->statement->closeCursor();
89
-		} catch( \PDOException $e ) {
96
+		}
97
+		catch( \PDOException $e )
98
+		{
90 99
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
91 100
 		}
92 101
 
@@ -101,9 +110,12 @@  discard block
 block discarded – undo
101 110
 	 */
102 111
 	public function nextResult() : bool
103 112
 	{
104
-		try {
113
+		try
114
+		{
105 115
 			return $this->statement->nextRowset();
106
-		} catch( \PDOException $e ) {
116
+		}
117
+		catch( \PDOException $e )
118
+		{
107 119
 			return false;
108 120
 		}
109 121
 	}
Please login to merge, or discard this patch.
src/MW/DB/Statement/DBAL/Simple.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,9 +69,12 @@
 block discarded – undo
69 69
 	 */
70 70
 	public function execute() : \Aimeos\MW\DB\Result\Iface
71 71
 	{
72
-		try {
72
+		try
73
+		{
73 74
 			$result = $this->getConnection()->getRawObject()->getWrappedConnection()->query( $this->sql );
74
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
75
+		}
76
+		catch( \Doctrine\DBAL\Driver\Exception $e )
77
+		{
75 78
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() );
76 79
 		}
77 80
 
Please login to merge, or discard this patch.
src/MW/DB/Statement/DBAL/Prepared.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,12 @@
 block discarded – undo
71 71
 	 */
72 72
 	public function execute() : \Aimeos\MW\DB\Result\Iface
73 73
 	{
74
-		try {
74
+		try
75
+		{
75 76
 			$result = $this->exec();
76
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
77
+		}
78
+		catch( \Doctrine\DBAL\Driver\Exception $e )
79
+		{
77 80
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql . map( $this->binds )->col( 0 )->toJson(), $e->getCode() );
78 81
 		}
79 82
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		switch( $type )
118 118
 		{
119 119
 			case \Aimeos\MW\DB\Statement\Base::PARAM_NULL:
120
-				$dbaltype = \Doctrine\DBAL\ParameterType::NULL; break;
120
+				$dbaltype = \Doctrine\DBAL\ParameterType::null; break;
121 121
 			case \Aimeos\MW\DB\Statement\Base::PARAM_BOOL:
122 122
 				$dbaltype = \Doctrine\DBAL\ParameterType::BOOLEAN; break;
123 123
 			case \Aimeos\MW\DB\Statement\Base::PARAM_INT:
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		}
134 134
 
135 135
 		if( is_null( $value ) ) {
136
-			$dbaltype = \Doctrine\DBAL\ParameterType::NULL;
136
+			$dbaltype = \Doctrine\DBAL\ParameterType::null;
137 137
 		}
138 138
 
139 139
 		return $dbaltype;
Please login to merge, or discard this patch.