Passed
Push — master ( a839b8...79c208 )
by Aimeos
05:16
created
setup/MShopAddLocaleData.php 1 patch
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,9 +52,12 @@  discard block
 block discarded – undo
52 52
 		$localeManager = \Aimeos\MShop::create( $this->context(), 'locale', 'Standard' );
53 53
 		$siteManager = $localeManager->getSubManager( 'site' );
54 54
 
55
-		try {
55
+		try
56
+		{
56 57
 			$siteItem = $siteManager->insert( $siteManager->create()->setLabel( $code )->setCode( $code ) );
57
-		} catch( \Aimeos\Base\DB\Exception $e ) {
58
+		}
59
+		catch( \Aimeos\Base\DB\Exception $e )
60
+		{
58 61
 			$siteItem = $siteManager->find( $code );
59 62
 		}
60 63
 
@@ -68,7 +71,9 @@  discard block
 block discarded – undo
68 71
 
69 72
 			$localeManager->save( $localeItem, false );
70 73
 		}
71
-		catch( \Aimeos\Base\DB\Exception $e ) {} // already in the database
74
+		catch( \Aimeos\Base\DB\Exception $e )
75
+		{
76
+} // already in the database
72 77
 	}
73 78
 
74 79
 
@@ -167,9 +172,13 @@  discard block
 block discarded – undo
167 172
 			$item = $localeManager->create()->fromArray( $dataset, true )
168 173
 				->setSiteId( $siteIds[$dataset['site']]['site'] );
169 174
 
170
-			try {
175
+			try
176
+			{
171 177
 				$localeManager->save( $item );
172
-			} catch( \Aimeos\Base\DB\Exception $e ) { ; } // if locale combination was already available
178
+			}
179
+			catch( \Aimeos\Base\DB\Exception $e )
180
+			{
181
+; } // if locale combination was already available
173 182
 		}
174 183
 	}
175 184
 }
Please login to merge, or discard this patch.