Passed
Push — master ( f038db...741ded )
by Aimeos
15:09
created
src/MShop/Service/Provider/Decorator/Postal.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,12 +119,13 @@
 block discarded – undo
119 119
 					return false;
120 120
 				}
121 121
 			}
122
-		}
123
-		elseif( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) // use billing address if no delivery address is available
122
+		} elseif( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) {
123
+			// use billing address if no delivery address is available
124 124
 		{
125 125
 			foreach( $addresses as $address )
126 126
 			{
127 127
 				$code = $address->getPostal();
128
+		}
128 129
 
129 130
 				if( $this->checkPostalCode( $code, 'postal.delivery-include' ) === false
130 131
 					|| $this->checkPostalCode( $code, 'postal.delivery-exclude' ) === true
Please login to merge, or discard this patch.
src/MShop/Service/Provider/Decorator/Date.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,9 @@
 block discarded – undo
97 97
 				$feconfig['date.value']['default'] = $value;
98 98
 			}
99 99
 		}
100
-		catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available
100
+		catch( \Aimeos\MShop\Service\Exception $e )
101
+		{
102
+} // If service isn't available
101 103
 
102 104
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
103 105
 	}
Please login to merge, or discard this patch.
src/MShop/Service/Provider/Decorator/Delivery.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,9 @@
 block discarded – undo
129 129
 				$feconfig['delivery.type']['default'] = $values;
130 130
 			}
131 131
 		}
132
-		catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available
132
+		catch( \Aimeos\MShop\Service\Exception $e )
133
+		{
134
+} // If service isn't available
133 135
 
134 136
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
135 137
 	}
Please login to merge, or discard this patch.
src/MShop/Plugin/Provider/Order/ProductFreeOptions.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
 			foreach( $value as $key => $product ) {
60 60
 				$value[$key] = $this->updatePrice( $product );
61 61
 			}
62
-		}
63
-		else
62
+		} else
64 63
 		{
65 64
 			$value = $this->updatePrice( $value );
66 65
 		}
@@ -139,8 +138,7 @@  discard block
 block discarded – undo
139 138
 	{
140 139
 		$priceManager = \Aimeos\MShop::create( $this->context(), 'price' );
141 140
 
142
-		$sortFcn = function( $a, $b ) use( $priceManager, $attrQtys )
143
-		{
141
+		$sortFcn = function( $a, $b ) use( $priceManager, $attrQtys ) {
144 142
 			if( ( $pricesA = $a->getRefItems( 'price', 'default', 'default' )->toArray() ) === [] ) {
145 143
 				return 1;
146 144
 			}
@@ -203,8 +201,7 @@  discard block
 block discarded – undo
203 201
 			{
204 202
 				$list = $this->sortByPrice( $list, $attrQtys );
205 203
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, (int) $prodConf[$type] );
206
-			}
207
-			else
204
+			} else
208 205
 			{
209 206
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, 0 );
210 207
 			}
Please login to merge, or discard this patch.
src/MShop/Index/Manager/DBBase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,8 +306,7 @@
 block discarded – undo
306 306
 		if( empty( $search->getSortations() ) && ( $attribute = reset( $attributes ) ) !== false )
307 307
 		{
308 308
 			$search = ( clone $search )->setSortations( [$search->sort( '+', $attribute->getCode() )] );
309
-		}
310
-		elseif( !empty( $search->getSortations() ) )
309
+		} elseif( !empty( $search->getSortations() ) )
311 310
 		{
312 311
 			$names = $search->translate( $search->getSortations(), [], $funcs );
313 312
 			$cols = $search->translate( $search->getSortations(), $translations, $funcs );
Please login to merge, or discard this patch.
setup/MShopAddLocaleData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
 
165 165
 			try {
166 166
 				$localeManager->save( $item );
167
-			} catch( \Aimeos\Base\DB\Exception $e ) { ; } // if locale combination was already available
167
+			} catch( \Aimeos\Base\DB\Exception $e ) {; } // if locale combination was already available
168 168
 		}
169 169
 	}
170 170
 }
Please login to merge, or discard this 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.
setup/unitperf/CatalogAddPerfData.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 				for( $i = 0; $i < $numCatPerLevel; $i++ ) {
62 62
 					$treeFcn( $parents, $catItem->getId(), $numCatPerLevel, $level - 1, $catLabel . '-' . ( $i + 1 ), $i );
63 63
 				}
64
-			}
65
-			else
64
+			} else
66 65
 			{
67 66
 				$fcn = function( array $parents, $catLabel ) {
68 67
 
@@ -120,9 +119,12 @@  discard block
 block discarded – undo
120 119
 
121 120
 		while( true )
122 121
 		{
123
-			try {
122
+			try
123
+			{
124 124
 				return $catalogManager->insert( $item, $parentId );
125
-			} catch( \Aimeos\Base\DB\Exception $e ) {
125
+			}
126
+			catch( \Aimeos\Base\DB\Exception $e )
127
+			{
126 128
 				if( $e->getCode() !== 40001 ) { throw $e; } // transaction deadlock
127 129
 			}
128 130
 		}
Please login to merge, or discard this patch.
src/MShop/Index/Manager/Attribute/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -701,7 +701,7 @@
 block discarded – undo
701 701
 
702 702
 				try {
703 703
 					$stmt->execute()->finish();
704
-				} catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates
704
+				} catch( \Aimeos\Base\DB\Exception $e ) {; } // Ignore duplicates
705 705
 			}
706 706
 		}
707 707
 	}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -699,9 +699,13 @@
 block discarded – undo
699 699
 				$stmt->bind( 7, $date ); // mtime
700 700
 				$stmt->bind( 8, $siteid );
701 701
 
702
-				try {
702
+				try
703
+				{
703 704
 					$stmt->execute()->finish();
704
-				} catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates
705
+				}
706
+				catch( \Aimeos\Base\DB\Exception $e )
707
+				{
708
+; } // Ignore duplicates
705 709
 			}
706 710
 		}
707 711
 	}
Please login to merge, or discard this patch.
src/MShop/Index/Manager/Supplier/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -504,7 +504,7 @@
 block discarded – undo
504 504
 
505 505
 						try {
506 506
 							$stmt->execute()->finish();
507
-						} catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates
507
+						} catch( \Aimeos\Base\DB\Exception $e ) {; } // Ignore duplicates
508 508
 					}
509 509
 				}
510 510
 			}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -502,9 +502,13 @@
 block discarded – undo
502 502
 						$stmt->bind( 7, $date ); //mtime
503 503
 						$stmt->bind( 8, $siteid );
504 504
 
505
-						try {
505
+						try
506
+						{
506 507
 							$stmt->execute()->finish();
507
-						} catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates
508
+						}
509
+						catch( \Aimeos\Base\DB\Exception $e )
510
+						{
511
+; } // Ignore duplicates
508 512
 					}
509 513
 				}
510 514
 			}
Please login to merge, or discard this patch.