Passed
Push — master ( eae7fe...bd335b )
by Aimeos
05:10
created
lib/mshoplib/setup/MShopAddLocaleData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
 
170 170
 			try {
171 171
 				$localeManager->save( $item );
172
-			} catch( \Aimeos\MW\DB\Exception $e ) { ; } // if locale combination was already available
172
+			} catch( \Aimeos\MW\DB\Exception $e ) {; } // if locale combination was already available
173 173
 		}
174 174
 	}
175 175
 }
Please login to merge, or discard this patch.
Braces   +19 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,9 +52,12 @@  discard block
 block discarded – undo
52 52
 		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::create( $this->context(), '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\MW\DB\Exception $e ) {
58
+		}
59
+		catch( \Aimeos\MW\DB\Exception $e )
60
+		{
58 61
 			$siteItem = $siteManager->find( $code );
59 62
 		}
60 63
 
@@ -69,7 +72,9 @@  discard block
 block discarded – undo
69 72
 
70 73
 			$localeManager->save( $localeItem, false );
71 74
 		}
72
-		catch( \Aimeos\MW\DB\Exception $e ) {} // already in the database
75
+		catch( \Aimeos\MW\DB\Exception $e )
76
+		{
77
+} // already in the database
73 78
 	}
74 79
 
75 80
 
@@ -91,9 +96,12 @@  discard block
 block discarded – undo
91 96
 
92 97
 		foreach( $data as $key => $dataset )
93 98
 		{
94
-			try {
99
+			try
100
+			{
95 101
 				$item = $manager->insert( $manager->create()->fromArray( $dataset ), $parentId );
96
-			} catch( \Aimeos\MW\DB\Exception $e ) {
102
+			}
103
+			catch( \Aimeos\MW\DB\Exception $e )
104
+			{
97 105
 				$item = $manager->find( $dataset['locale.site.code'] );
98 106
 			}
99 107
 
@@ -167,9 +175,13 @@  discard block
 block discarded – undo
167 175
 				->set( 'site_id', $siteIds[$dataset['site']]['id'] )
168 176
 				->setSiteId( $siteIds[$dataset['site']]['site'] );
169 177
 
170
-			try {
178
+			try
179
+			{
171 180
 				$localeManager->save( $item );
172
-			} catch( \Aimeos\MW\DB\Exception $e ) { ; } // if locale combination was already available
181
+			}
182
+			catch( \Aimeos\MW\DB\Exception $e )
183
+			{
184
+; } // if locale combination was already available
173 185
 		}
174 186
 	}
175 187
 }
Please login to merge, or discard this patch.