Passed
Push — master ( 354380...a139a3 )
by Aimeos
04:53
created
lib/mshoplib/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.
up.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,21 +46,18 @@
 block discarded – undo
46 46
 				{
47 47
 					$options[$name] = (array) $options[$name];
48 48
 					$options[$name][] = substr( $option, $pos + 1 );
49
-				}
50
-				else
49
+				} else
51 50
 				{
52 51
 					$options[$name] = substr( $option, $pos + 1 );
53 52
 				}
54 53
 
55 54
 				unset( $params[$key] );
56
-			}
57
-			else
55
+			} else
58 56
 			{
59 57
 				printf( "Invalid option \"%1\$s\"\n", $option );
60 58
 				usage();
61 59
 			}
62
-		}
63
-		elseif( $option[0] === '-' )
60
+		} elseif( $option[0] === '-' )
64 61
 		{
65 62
 			$options[$option[1]] = substr( $option, 1 );
66 63
 			unset( $params[$key] );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/CustomerAddTestData.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,9 +138,12 @@
 block discarded – undo
138 138
 		{
139 139
 			foreach( $data['customer/group'] as $entry )
140 140
 			{
141
-				try {
141
+				try
142
+				{
142 143
 					$groupManager->save( $groupManager->find( $entry['customer.group.code'] )->fromArray( $entry ) );
143
-				} catch( \Exception $e ) {
144
+				}
145
+				catch( \Exception $e )
146
+				{
144 147
 					$groupManager->save( $groupManager->create()->fromArray( $entry ), false );
145 148
 				}
146 149
 			}
Please login to merge, or discard this patch.
controller/common/src/Controller/Common/Order/Standard.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -344,7 +344,8 @@
 block discarded – undo
344 344
 				{
345 345
 					$stockManager->decrease( [$item->getProductId() => -1 * $how * $item->getQuantity()], $item->getStockType() );
346 346
 
347
-					switch( $item->getType() ) {
347
+					switch( $item->getType() )
348
+					{
348 349
 						case 'default':
349 350
 							$this->updateStockBundle( $item->getParentProductId(), $item->getStockType() ); break;
350 351
 						case 'select':
Please login to merge, or discard this patch.
lib/mwlib/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.
lib/mwlib/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.
lib/mwlib/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.
lib/mshoplib/setup/MShopAddLocaleData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
 
222 222
 			try {
223 223
 				$localeItemManager->save( $localeItem );
224
-			} catch( \Aimeos\MW\DB\Exception $e ) { ; } // if locale combination was already available
224
+			} catch( \Aimeos\MW\DB\Exception $e ) {; } // if locale combination was already available
225 225
 		}
226 226
 	}
227 227
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,9 @@  discard block
 block discarded – undo
77 77
 
78 78
 			$localeManager->save( $localeItem, false );
79 79
 		}
80
-		catch( \Aimeos\MW\DB\Exception $e ) {} // already in the database
80
+		catch( \Aimeos\MW\DB\Exception $e )
81
+		{
82
+} // already in the database
81 83
 	}
82 84
 
83 85
 
@@ -219,9 +221,13 @@  discard block
 block discarded – undo
219 221
 			$localeItem->setPosition( $dataset['pos'] );
220 222
 			$localeItem->setStatus( $dataset['status'] );
221 223
 
222
-			try {
224
+			try
225
+			{
223 226
 				$localeItemManager->save( $localeItem );
224
-			} catch( \Aimeos\MW\DB\Exception $e ) { ; } // if locale combination was already available
227
+			}
228
+			catch( \Aimeos\MW\DB\Exception $e )
229
+			{
230
+; } // if locale combination was already available
225 231
 		}
226 232
 	}
227 233
 }
Please login to merge, or discard this patch.
lib/mshoplib/src/MAdmin/Log/Manager/Standard.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,9 +156,12 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface
158 158
 	{
159
-		try {
159
+		try
160
+		{
160 161
 			$values['log.siteid'] = $this->context()->getLocale()->getSiteId();
161
-		} catch( \Exception $e ) {
162
+		}
163
+		catch( \Exception $e )
164
+		{
162 165
 			$values['log.siteid'] = null;
163 166
 		}
164 167
 
@@ -181,9 +184,12 @@  discard block
 block discarded – undo
181 184
 
182 185
 		$context = $this->context();
183 186
 
184
-		try {
187
+		try
188
+		{
185 189
 			$siteid = $context->getLocale()->getSiteId();
186
-		} catch( \Exception $e ) {
190
+		}
191
+		catch( \Exception $e )
192
+		{
187 193
 			$siteid = '';
188 194
 		}
189 195
 
@@ -235,8 +241,7 @@  discard block
 block discarded – undo
235 241
 				 */
236 242
 				$path = 'madmin/log/manager/insert';
237 243
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
238
-			}
239
-			else
244
+			} else
240 245
 			{
241 246
 				/** madmin/log/manager/update/mysql
242 247
 				 * Updates an existing log record in the database
Please login to merge, or discard this patch.