Passed
Push — master ( bfd2b7...b98f34 )
by Aimeos
04:16
created
src/MShop/Service/Provider/Decorator/Quantity.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@
 block discarded – undo
98 98
 				foreach( $products as $prodItem ) { // calculate bundled products
99 99
 					$sum += $qty * $prodItem->getQuantity();
100 100
 				}
101
-			}
102
-			else
101
+			} else
103 102
 			{
104 103
 				$sum += $qty;
105 104
 			}
Please login to merge, or discard this patch.
src/MShop/Service/Provider/Decorator/Supplier.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,9 @@
 block discarded – undo
172 172
 				$feconfig['supplier.code']['default'] = [$value => $address] + $feconfig['supplier.code']['default'];
173 173
 			}
174 174
 		}
175
-		catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available
175
+		catch( \Aimeos\MShop\Service\Exception $e )
176
+		{
177
+} // If service isn't available
176 178
 
177 179
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
178 180
 	}
Please login to merge, or discard this patch.
src/MShop/Service/Provider/Decorator/Time.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,9 @@
 block discarded – undo
114 114
 				$feconfig['time.hourminute']['default'] = $value;
115 115
 			}
116 116
 		}
117
-		catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available
117
+		catch( \Aimeos\MShop\Service\Exception $e )
118
+		{
119
+} // If service isn't available
118 120
 
119 121
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
120 122
 	}
Please login to merge, or discard this patch.
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/Locale/Manager/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
 	{
208 208
 		$items = [];
209 209
 		$level = \Aimeos\MShop\Locale\Manager\Base::SITE_PATH;
210
-		$search = (clone $search)->add( $this->siteCondition( 'locale.siteid', $level ) );
210
+		$search = ( clone $search )->add( $this->siteCondition( 'locale.siteid', $level ) );
211 211
 
212 212
 		foreach( $this->searchEntries( $search, $ref, $total ) as $row )
213 213
 		{
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -267,9 +267,13 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface
269 269
 	{
270
-		try {
270
+		try
271
+		{
271 272
 			$values['locale.siteid'] = $values['locale.siteid'] ?? $this->context()->locale()->getSiteId();
272
-		} catch( \Exception $e ) {} // if no locale item is available
273
+		}
274
+		catch( \Exception $e )
275
+		{
276
+} // if no locale item is available
273 277
 
274 278
 		return $this->createItemBase( $values );
275 279
 	}
@@ -431,8 +435,7 @@  discard block
 block discarded – undo
431 435
 			 */
432 436
 			$path = 'mshop/locale/manager/insert';
433 437
 			$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
434
-		}
435
-		else
438
+		} else
436 439
 		{
437 440
 			/** mshop/locale/manager/update/mysql
438 441
 			 * Updates an existing locale record in the database
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.
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   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,9 +109,13 @@
 block discarded – undo
109 109
 			$this->context()->setLocale( $localeManager->create()->setSiteId( $siteIds[$dataset['site']]['site'] ) );
110 110
 			$item = $localeManager->create()->fromArray( $dataset, true );
111 111
 
112
-			try {
112
+			try
113
+			{
113 114
 				$localeManager->save( $item );
114
-			} catch( \Aimeos\Base\DB\Exception $e ) { ; } // if locale combination was already available
115
+			}
116
+			catch( \Aimeos\Base\DB\Exception $e )
117
+			{
118
+; } // if locale combination was already available
115 119
 		}
116 120
 	}
117 121
 }
Please login to merge, or discard this patch.