Passed
Push — master ( 0cda2e...f3fa1e )
by Aimeos
17:16 queued 07:34
created
lib/mshoplib/src/MShop/Index/Manager/Supplier/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@
 block discarded – undo
463 463
 
464 464
 						try {
465 465
 							$stmt->execute()->finish();
466
-						} catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates
466
+						} catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates
467 467
 					}
468 468
 				}
469 469
 			}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -497,9 +497,13 @@
 block discarded – undo
497 497
 						$stmt->bind( 7, $date ); //mtime
498 498
 						$stmt->bind( 8, $siteid );
499 499
 
500
-						try {
500
+						try
501
+						{
501 502
 							$stmt->execute()->finish();
502
-						} catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates
503
+						}
504
+						catch( \Aimeos\MW\DB\Exception $e )
505
+						{
506
+; } // Ignore duplicates
503 507
 					}
504 508
 				}
505 509
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/MShopAddCatalogDataDefault.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,9 +46,12 @@
 block discarded – undo
46 46
 
47 47
 		foreach( $data as $entry )
48 48
 		{
49
-			try {
49
+			try
50
+			{
50 51
 				$manager->find( $entry['catalog.code'] );
51
-			} catch( \Aimeos\MW\Exception $e ) {
52
+			}
53
+			catch( \Aimeos\MW\Exception $e )
54
+			{
52 55
 				$manager->insert( $manager->create()->fromArray( $entry ) );
53 56
 			}
54 57
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Media/Image/Imagick.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -171,15 +171,13 @@  discard block
 block discarded – undo
171 171
 				$newMedia->image->cropThumbnailImage( (int) $width, (int) $height );
172 172
 				// see https://www.php.net/manual/en/imagick.cropthumbnailimage.php#106710
173 173
 				$newMedia->image->setImagePage( 0, 0, 0, 0 );
174
-			}
175
-			elseif( $fit === 1 && $width && $height )
174
+			} elseif( $fit === 1 && $width && $height )
176 175
 			{
177 176
 				$w = ( $width - $newMedia->image->getImageWidth() ) / 2;
178 177
 				$h = ( $height - $newMedia->image->getImageHeight() ) / 2;
179 178
 
180 179
 				$newMedia->image->extentImage( $width, $height, (int) -$w, (int) -$h );
181
-			}
182
-			else
180
+			} else
183 181
 			{
184 182
 				$w = $this->image->getImageWidth();
185 183
 				$h = $this->image->getImageHeight();
@@ -238,8 +236,7 @@  discard block
 block discarded – undo
238 236
 			$wmimage = clone self::$wmimg;
239 237
 			$wmimage->resizeImage( $ww, $wh, \Imagick::FILTER_CUBIC, 0.8 );
240 238
 			self::$wmimages[$ww . 'x' . $wh] = $wmimage;
241
-		}
242
-		else
239
+		} else
243 240
 		{
244 241
 			$wmimage = self::$wmimages[$ww . 'x' . $wh];
245 242
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Media/Image/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,8 +196,7 @@  discard block
 block discarded – undo
196 196
 			$ratio = ( $w < $h ? $width / $w : $height / $h );
197 197
 			$newHeight = (int) $h * $ratio;
198 198
 			$newWidth = (int) $w * $ratio;
199
-		}
200
-		else
199
+		} else
201 200
 		{
202 201
 			list( $newWidth, $newHeight ) = $this->getSizeFitted( $w, $h, $width, $height );
203 202
 
@@ -261,8 +260,7 @@  discard block
 block discarded – undo
261 260
 
262 261
 			imagedestroy( $result );
263 262
 			$newMedia->image = $newImage;
264
-		}
265
-		else
263
+		} else
266 264
 		{
267 265
 			$newMedia->image = $result;
268 266
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddLocaleData.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,9 @@  discard block
 block discarded – undo
76 76
 
77 77
 			$localeManager->save( $localeItem, false );
78 78
 		}
79
-		catch( \Aimeos\MW\DB\Exception $e ) {} // already in the database
79
+		catch( \Aimeos\MW\DB\Exception $e )
80
+		{
81
+} // already in the database
80 82
 	}
81 83
 
82 84
 
@@ -217,9 +219,13 @@  discard block
 block discarded – undo
217 219
 			$localeItem->setPosition( $dataset['pos'] );
218 220
 			$localeItem->setStatus( $dataset['status'] );
219 221
 
220
-			try {
222
+			try
223
+			{
221 224
 				$localeItemManager->save( $localeItem );
222
-			} catch( \Aimeos\MW\DB\Exception $e ) {; } // if locale combination was already available
225
+			}
226
+			catch( \Aimeos\MW\DB\Exception $e )
227
+			{
228
+; } // if locale combination was already available
223 229
 		}
224 230
 	}
225 231
 }
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddAttributeData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 				$item = $item->setId( null )->fromArray( $dataset );
51 51
 				$manager->save( $item );
52 52
 			}
53
-			catch( \Exception $e ) { ; } // if attribute was already available
53
+			catch( \Exception $e ) {; } // if attribute was already available
54 54
 		}
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 				$item = $item->setId( null )->fromArray( $dataset );
51 51
 				$manager->save( $item );
52 52
 			}
53
-			catch( \Exception $e ) { ; } // if attribute was already available
53
+			catch( \Exception $e )
54
+			{
55
+; } // if attribute was already available
54 56
 		}
55 57
 	}
56 58
 }
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddTypeData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 				try {
79 79
 					$domainManager->save( $type );
80 80
 					$num++;
81
-				} catch( \Exception $e ) { ; } // if type was already available
81
+				} catch( \Exception $e ) {; } // if type was already available
82 82
 			}
83 83
 		}
84 84
 	}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,10 +75,14 @@
 block discarded – undo
75 75
 				$type->setLabel( $dataset['label'] );
76 76
 				$type->setStatus( $dataset['status'] );
77 77
 
78
-				try {
78
+				try
79
+				{
79 80
 					$domainManager->save( $type );
80 81
 					$num++;
81
-				} catch( \Exception $e ) { ; } // if type was already available
82
+				}
83
+				catch( \Exception $e )
84
+				{
85
+; } // if type was already available
82 86
 			}
83 87
 		}
84 88
 	}
Please login to merge, or discard this patch.
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.
lib/mshoplib/setup/default/DemoAddProductData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
166 166
 					$refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() );
167 167
 				}
168
-				catch( \RuntimeException $e ) { ; } // attribute doesn't exist yet
168
+				catch( \RuntimeException $e ) {; } // attribute doesn't exist yet
169 169
 
170 170
 				$refItem = $this->addRefItems( $refItem, $data );
171 171
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,9 @@
 block discarded – undo
165 165
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
166 166
 					$refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() );
167 167
 				}
168
-				catch( \RuntimeException $e ) { ; } // attribute doesn't exist yet
168
+				catch( \RuntimeException $e )
169
+				{
170
+; } // attribute doesn't exist yet
169 171
 
170 172
 				$refItem = $this->addRefItems( $refItem, $data );
171 173
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.