Passed
Pull Request — master (#255)
by Laurent
06:00
created
lib/mshoplib/setup/MShopAddPluginData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,10 +97,14 @@
 block discarded – undo
97 97
 				$item->setPosition( $dataset['position'] );
98 98
 			}
99 99
 
100
-			try {
100
+			try
101
+			{
101 102
 				$pluginManager->save( $item );
102 103
 				$num++;
103
-			} catch( \Exception $e ) {; } // if plugin configuration was already available
104
+			}
105
+			catch( \Exception $e )
106
+			{
107
+; } // if plugin configuration was already available
104 108
 		}
105 109
 
106 110
 		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
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
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 				try {
82 82
 					$domainManager->save( $type );
83 83
 					$num++;
84
-				} catch( \Exception $e ) { ; } // if type was already available
84
+				} catch( \Exception $e ) {; } // if type was already available
85 85
 			}
86 86
 
87 87
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,10 +78,14 @@
 block discarded – undo
78 78
 				$type->setLabel( $dataset['label'] );
79 79
 				$type->setStatus( $dataset['status'] );
80 80
 
81
-				try {
81
+				try
82
+				{
82 83
 					$domainManager->save( $type );
83 84
 					$num++;
84
-				} catch( \Exception $e ) { ; } // if type was already available
85
+				}
86
+				catch( \Exception $e )
87
+				{
88
+; } // if type was already available
85 89
 			}
86 90
 
87 91
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
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
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 				$manager->save( $item );
56 56
 				$num++;
57 57
 			}
58
-			catch( \Exception $e ) { ; } // if attribute was already available
58
+			catch( \Exception $e ) {; } // if attribute was already available
59 59
 		}
60 60
 
61 61
 		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,9 @@
 block discarded – undo
55 55
 				$manager->save( $item );
56 56
 				$num++;
57 57
 			}
58
-			catch( \Exception $e ) { ; } // if attribute was already available
58
+			catch( \Exception $e )
59
+			{
60
+; } // if attribute was already available
59 61
 		}
60 62
 
61 63
 		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/BaseAddTestData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,9 +173,13 @@
 block discarded – undo
173 173
 
174 174
 				foreach( $testdata[$domain] as $entry )
175 175
 				{
176
-					try {
176
+					try
177
+					{
177 178
 						$manager->save( $manager->create()->fromArray( $entry ), false );
178
-					} catch( \Exception $e ) {} // Duplicate entry
179
+					}
180
+					catch( \Exception $e )
181
+					{
182
+} // Duplicate entry
179 183
 				}
180 184
 			}
181 185
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/CustomerAddTestData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,9 +142,13 @@
 block discarded – undo
142 142
 		{
143 143
 			foreach( $data['customer/group'] as $entry )
144 144
 			{
145
-				try {
145
+				try
146
+				{
146 147
 					$groupManager->save( $groupManager->create()->fromArray( $entry ), false );
147
-				} catch( \Exception $e ) { echo $e->getMessage(); } // ignore duplicates
148
+				}
149
+				catch( \Exception $e )
150
+				{
151
+echo $e->getMessage(); } // ignore duplicates
148 152
 			}
149 153
 		}
150 154
 	}
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddDataAbstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
 
90 90
 				$attrManager->save( $item );
91 91
 				$id = $item->getId();
92
-			}
93
-			else
92
+			} else
94 93
 			{
95 94
 				$id = $attrItem->getId();
96 95
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddLocaleData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,9 +239,13 @@
 block discarded – undo
239 239
 			$localeItem->setPosition( $dataset['pos'] );
240 240
 			$localeItem->setStatus( $dataset['status'] );
241 241
 
242
-			try {
242
+			try
243
+			{
243 244
 				$localeItemManager->save( $localeItem );
244
-			} catch( \Aimeos\MW\DB\Exception $e ) {; } // if locale combination was already available
245
+			}
246
+			catch( \Aimeos\MW\DB\Exception $e )
247
+			{
248
+; } // if locale combination was already available
245 249
 		}
246 250
 
247 251
 		$this->status( 'done' );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Expression/Traits.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,7 @@
 block discarded – undo
139 139
 						$list[] = $this->escape( '==', $this->getParamType( $item ), $item );
140 140
 					}
141 141
 					$params[$i] = join( ',', $list );
142
-				}
143
-				else
142
+				} else
144 143
 				{
145 144
 					$params[$i] = $this->escape( '==', $this->getParamType( $params[$i] ), $params[$i] );
146 145
 				}
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->getContext()->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->getContext();
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.