Completed
Push — master ( 52c730...9eba1c )
by Aimeos
08:52
created
lib/mshoplib/setup/default/DemoAddCouponData.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
 			}
90 90
 
91 91
 			$this->status( 'added' );
92
-		}
93
-		else
92
+		} else
94 93
 		{
95 94
 			$this->status( 'removed' );
96 95
 		}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 		if( $value === '1' )
75 75
 		{
76 76
 			$ds = DIRECTORY_SEPARATOR;
77
-			$path = __DIR__ . $ds . 'data' . $ds . 'demo-coupon.php';
77
+			$path = __DIR__.$ds.'data'.$ds.'demo-coupon.php';
78 78
 
79 79
 			if( ( $data = include( $path ) ) == false ) {
80 80
 				throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for coupon domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddCustomerData.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
75 75
 			$this->saveCustomerItems( $data );
76 76
 
77 77
 			$this->status( 'added' );
78
-		}
79
-		else
78
+		} else
80 79
 		{
81 80
 			$this->status( 'removed' );
82 81
 		}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 		if( $value === '1' )
76 76
 		{
77 77
 			$ds = DIRECTORY_SEPARATOR;
78
-			$path = __DIR__ . $ds . 'data' . $ds . 'demo-customer.php';
78
+			$path = __DIR__.$ds.'data'.$ds.'demo-customer.php';
79 79
 
80 80
 			if( ( $data = include( $path ) ) == false ) {
81 81
 				throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddProductData.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@
 block discarded – undo
77 77
 		{
78 78
 			$this->addDemoData();
79 79
 			$this->status( 'added' );
80
-		}
81
-		else
80
+		} else
82 81
 		{
83 82
 			$this->status( 'removed' );
84 83
 		}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			$this->removeItems( $item->getId(), 'product/lists', 'product', 'text' );
70 70
 			$this->removeListItems( $item->getId(), 'product/lists', 'product' );
71 71
 
72
-			$productCodes[] =  $item->getCode();
72
+			$productCodes[] = $item->getCode();
73 73
 		}
74 74
 
75 75
 		$this->removeStockItems( $productCodes );
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	protected function addDemoData()
97 97
 	{
98 98
 		$ds = DIRECTORY_SEPARATOR;
99
-		$path = __DIR__ . $ds . 'data' . $ds . 'demo-product.php';
99
+		$path = __DIR__.$ds.'data'.$ds.'demo-product.php';
100 100
 
101 101
 		if( ( $data = include( $path ) ) == false ) {
102 102
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for product domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/src/MAdmin/Cache/Manager/Standard.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -201,9 +201,12 @@  discard block
 block discarded – undo
201 201
 			);
202 202
 			$dbm = $context->getDatabaseManager();
203 203
 
204
-			try {
204
+			try
205
+			{
205 206
 				$this->object = \Aimeos\MW\Cache\Factory::createManager( $name, $config, $dbm );
206
-			} catch( \Exception $e ) {
207
+			}
208
+			catch( \Exception $e )
209
+			{
207 210
 				$this->object = \Aimeos\MW\Cache\Factory::createManager( 'DB', $config, $dbm );
208 211
 			}
209 212
 		}
@@ -265,9 +268,12 @@  discard block
 block discarded – undo
265 268
 	 */
266 269
 	public function createItem()
267 270
 	{
268
-		try {
271
+		try
272
+		{
269 273
 			$values = array( 'siteid' => $this->getContext()->getLocale()->getSiteId() );
270
-		} catch( \Exception $e ) {
274
+		}
275
+		catch( \Exception $e )
276
+		{
271 277
 			$values = array( 'siteid' => null );
272 278
 		}
273 279
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Common/Manager/Lists/Base.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -243,8 +243,7 @@
 block discarded – undo
243 243
 				$stmt->bind( 8, $pos, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
244 244
 
245 245
 				$stmt->execute()->finish();
246
-			}
247
-			else
246
+			} else
248 247
 			{
249 248
 				$sql = $this->getSqlConfig( $cfgPath . 'getposmax' );
250 249
 
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	public function aggregate( \Aimeos\MW\Criteria\Iface $search, $key )
64 64
 	{
65 65
 		$required = array( trim( $this->prefix, '.' ) );
66
-		return $this->aggregateBase( $search, $key, $this->getConfigPath() . 'aggregate', $required );
66
+		return $this->aggregateBase( $search, $key, $this->getConfigPath().'aggregate', $required );
67 67
 	}
68 68
 
69 69
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	public function createItem()
76 76
 	{
77 77
 		$values = array(
78
-			$this->prefix . 'siteid' => $this->getContext()->getLocale()->getSiteId()
78
+			$this->prefix.'siteid' => $this->getContext()->getLocale()->getSiteId()
79 79
 		);
80 80
 		return $this->createItemBase( $values );
81 81
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			}
113 113
 
114 114
 			$time = date( 'Y-m-d H:i:s' );
115
-			$stmt = $this->getCachedStatement( $conn, $this->getConfigPath() . $type );
115
+			$stmt = $this->getCachedStatement( $conn, $this->getConfigPath().$type );
116 116
 
117 117
 			$stmt->bind( 1, $item->getParentId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
118 118
 			$stmt->bind( 2, $item->getTypeId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 			if( $fetch === true )
140 140
 			{
141 141
 				if( $id === null ) {
142
-					$path = $this->getConfigPath() . 'newid';
142
+					$path = $this->getConfigPath().'newid';
143 143
 					$item->setId( $this->newId( $conn, $path ) );
144 144
 				} else {
145 145
 					$item->setId( $id ); // modified false
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	public function deleteItems( array $ids )
165 165
 	{
166
-		$this->deleteItemsBase( $ids, $this->getConfigPath() . 'delete' );
166
+		$this->deleteItemsBase( $ids, $this->getConfigPath().'delete' );
167 167
 	}
168 168
 
169 169
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			{
236 236
 				$newpos = $pos;
237 237
 
238
-				$sql = $this->getSqlConfig( $cfgPath . 'move' );
238
+				$sql = $this->getSqlConfig( $cfgPath.'move' );
239 239
 
240 240
 				$stmt = $conn->create( $sql );
241 241
 				$stmt->bind( 1, +1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 			}
252 252
 			else
253 253
 			{
254
-				$sql = $this->getSqlConfig( $cfgPath . 'getposmax' );
254
+				$sql = $this->getSqlConfig( $cfgPath.'getposmax' );
255 255
 
256 256
 				$stmt = $conn->create( $sql );
257 257
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 				}
270 270
 			}
271 271
 
272
-			$sql = $this->getSqlConfig( $cfgPath . 'updatepos' );
272
+			$sql = $this->getSqlConfig( $cfgPath.'updatepos' );
273 273
 
274 274
 			$stmt = $conn->create( $sql );
275 275
 			$stmt->bind( 1, $newpos, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
 			if( $oldpos > 0 )
288 288
 			{
289
-				$sql = $this->getSqlConfig( $cfgPath . 'move' );
289
+				$sql = $this->getSqlConfig( $cfgPath.'move' );
290 290
 
291 291
 				$stmt = $conn->create( $sql );
292 292
 				$stmt->bind( 1, -1, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
@@ -336,8 +336,8 @@  discard block
 block discarded – undo
336 336
 			}
337 337
 
338 338
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
339
-			$cfgPathSearch = $this->getConfigPath() . 'search';
340
-			$cfgPathCount = $this->getConfigPath() . 'count';
339
+			$cfgPathSearch = $this->getConfigPath().'search';
340
+			$cfgPathCount = $this->getConfigPath().'count';
341 341
 
342 342
 			$name = trim( $this->prefix, '.' );
343 343
 			$required = array( $name );
@@ -346,12 +346,12 @@  discard block
 block discarded – undo
346 346
 
347 347
 			while( ( $row = $results->fetch() ) !== false )
348 348
 			{
349
-				if( ( $row[$this->prefix . 'config'] = json_decode( $row[$this->prefix . 'config'], true ) ) === null ) {
350
-					$row[$this->prefix . 'config'] = [];
349
+				if( ( $row[$this->prefix.'config'] = json_decode( $row[$this->prefix.'config'], true ) ) === null ) {
350
+					$row[$this->prefix.'config'] = [];
351 351
 				}
352 352
 
353
-				$map[$row[$this->prefix . 'id']] = $row;
354
-				$typeIds[$row[$this->prefix . 'typeid']] = null;
353
+				$map[$row[$this->prefix.'id']] = $row;
354
+				$typeIds[$row[$this->prefix.'typeid']] = null;
355 355
 			}
356 356
 
357 357
 			$dbm->release( $conn, $dbname );
@@ -366,19 +366,19 @@  discard block
 block discarded – undo
366 366
 		{
367 367
 			$typeManager = $this->getObject()->getSubManager( 'type' );
368 368
 			$typeSearch = $typeManager->createSearch();
369
-			$typeSearch->setConditions( $typeSearch->compare( '==', $name . '.type.id', array_keys( $typeIds ) ) );
369
+			$typeSearch->setConditions( $typeSearch->compare( '==', $name.'.type.id', array_keys( $typeIds ) ) );
370 370
 			$typeSearch->setSlice( 0, $search->getSliceSize() );
371 371
 			$typeItems = $typeManager->searchItems( $typeSearch );
372 372
 
373 373
 			foreach( $map as $id => $row )
374 374
 			{
375
-				if( isset( $typeItems[$row[$this->prefix . 'typeid']] ) )
375
+				if( isset( $typeItems[$row[$this->prefix.'typeid']] ) )
376 376
 				{
377
-					$row[$this->prefix . 'type'] = $typeItems[$row[$this->prefix . 'typeid']]->getCode();
378
-					$row[$this->prefix . 'typename'] = $typeItems[$row[$this->prefix . 'typeid']]->getName();
377
+					$row[$this->prefix.'type'] = $typeItems[$row[$this->prefix.'typeid']]->getCode();
378
+					$row[$this->prefix.'typename'] = $typeItems[$row[$this->prefix.'typeid']]->getName();
379 379
 				}
380 380
 
381
-				$items[$row[$this->prefix . 'id']] = $this->createItemBase( $row );
381
+				$items[$row[$this->prefix.'id']] = $this->createItemBase( $row );
382 382
 			}
383 383
 		}
384 384
 
@@ -417,8 +417,8 @@  discard block
 block discarded – undo
417 417
 			}
418 418
 
419 419
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
420
-			$cfgPathSearch = $this->getConfigPath() . 'search';
421
-			$cfgPathCount = $this->getConfigPath() . 'count';
420
+			$cfgPathSearch = $this->getConfigPath().'search';
421
+			$cfgPathCount = $this->getConfigPath().'count';
422 422
 
423 423
 			$name = trim( $this->prefix, '.' );
424 424
 			$required = array( $name );
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
427 427
 
428 428
 			while( ( $row = $results->fetch() ) !== false ) {
429
-				$map[$row[$this->prefix . 'domain']][] = $row[$this->prefix . 'refid'];
429
+				$map[$row[$this->prefix.'domain']][] = $row[$this->prefix.'refid'];
430 430
 			}
431 431
 
432 432
 			$dbm->release( $conn, $dbname );
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 
445 445
 			$search = $manager->createSearch( true );
446 446
 			$expr = array(
447
-				$search->compare( '==', str_replace( '/', '.', $domain ) . '.id', $list ),
447
+				$search->compare( '==', str_replace( '/', '.', $domain ).'.id', $list ),
448 448
 				$search->getConditions(),
449 449
 			);
450 450
 			$search->setConditions( $search->combine( '&&', $expr ) );
@@ -476,13 +476,13 @@  discard block
 block discarded – undo
476 476
 			$expr[] = $object->getConditions();
477 477
 
478 478
 			$exprTwo = [];
479
-			$exprTwo[] = $object->compare( '<=', $prefix . '.datestart', $curDate );
480
-			$exprTwo[] = $object->compare( '==', $prefix . '.datestart', null );
479
+			$exprTwo[] = $object->compare( '<=', $prefix.'.datestart', $curDate );
480
+			$exprTwo[] = $object->compare( '==', $prefix.'.datestart', null );
481 481
 			$expr[] = $object->combine( '||', $exprTwo );
482 482
 
483 483
 			$exprTwo = [];
484
-			$exprTwo[] = $object->compare( '>=', $prefix . '.dateend', $curDate );
485
-			$exprTwo[] = $object->compare( '==', $prefix . '.dateend', null );
484
+			$exprTwo[] = $object->compare( '>=', $prefix.'.dateend', $curDate );
485
+			$exprTwo[] = $object->compare( '==', $prefix.'.dateend', null );
486 486
 			$expr[] = $object->combine( '||', $exprTwo );
487 487
 
488 488
 			$object->setConditions( $object->combine( '&&', $expr ) );
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	 */
504 504
 	public function getSubManager( $manager, $name = null )
505 505
 	{
506
-		return $this->getSubManagerBase( 'common', 'lists/' . $manager, $name );
506
+		return $this->getSubManagerBase( 'common', 'lists/'.$manager, $name );
507 507
 	}
508 508
 
509 509
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Coupon/Provider/Base.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
 			$taxrates[$taxrate]->addItem( $price );
292 292
 		}
293
-		catch( \Exception $e ) { ; } // if delivery service isn't available
293
+		catch( \Exception $e ) {; } // if delivery service isn't available
294 294
 
295 295
 		try
296 296
 		{
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 
304 304
 			$taxrates[$taxrate]->addItem( $price );
305 305
 		}
306
-		catch( \Exception $e ) { ; } // if payment service isn't available
306
+		catch( \Exception $e ) {; } // if payment service isn't available
307 307
 
308 308
 		return $taxrates;
309 309
 	}
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,8 +233,7 @@  discard block
 block discarded – undo
233 233
 			{
234 234
 				$value = $price->getValue() + $price->getCosts();
235 235
 				$rebate -= $value;
236
-			}
237
-			else
236
+			} else
238 237
 			{
239 238
 				$value = $rebate;
240 239
 				$rebate = '0.00';
@@ -290,7 +289,9 @@  discard block
 block discarded – undo
290 289
 
291 290
 			$taxrates[$taxrate]->addItem( $price );
292 291
 		}
293
-		catch( \Exception $e ) { ; } // if delivery service isn't available
292
+		catch( \Exception $e )
293
+		{
294
+; } // if delivery service isn't available
294 295
 
295 296
 		try
296 297
 		{
@@ -303,7 +304,9 @@  discard block
 block discarded – undo
303 304
 
304 305
 			$taxrates[$taxrate]->addItem( $price );
305 306
 		}
306
-		catch( \Exception $e ) { ; } // if payment service isn't available
307
+		catch( \Exception $e )
308
+		{
309
+; } // if payment service isn't available
307 310
 
308 311
 		return $taxrates;
309 312
 	}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Coupon/Provider/FixedRebate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
 			if( isset( $config['fixedrebate.rebate'][$currency] ) ) {
51 51
 				$rebate = $config['fixedrebate.rebate'][$currency];
52 52
 			}
53
-		}
54
-		else
53
+		} else
55 54
 		{
56 55
 			$rebate = $config['fixedrebate.rebate'];
57 56
 		}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Manager/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@
 block discarded – undo
209 209
 	{
210 210
 		$path = 'mshop/plugin/manager/submanagers';
211 211
 
212
-		return $this->getResourceTypeBase( 'plugin', $path, array( 'type'), $withsub );
212
+		return $this->getResourceTypeBase( 'plugin', $path, array( 'type' ), $withsub );
213 213
 	}
214 214
 
215 215
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -444,8 +444,7 @@
 block discarded – undo
444 444
 				 * @see mshop/plugin/manager/standard/count/ansi
445 445
 				 */
446 446
 				$path = 'mshop/plugin/manager/standard/insert';
447
-			}
448
-			else
447
+			} else
449 448
 			{
450 449
 				/** mshop/plugin/manager/standard/update/mysql
451 450
 				 * Updates an existing plugin record in the database
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Country.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,10 +118,11 @@
 block discarded – undo
118 118
 			) {
119 119
 				return false;
120 120
 			}
121
-		}
122
-		else if( isset( $addresses[$paymentType] ) ) // use billing address if no delivery address is available
121
+		} else if( isset( $addresses[$paymentType] ) ) {
122
+			// use billing address if no delivery address is available
123 123
 		{
124 124
 			$code = strtoupper( $addresses[$paymentType]->getCountryId() );
125
+		}
125 126
 
126 127
 			if( $this->checkCountryCode( $code, 'country.delivery-include' ) === false
127 128
 				|| $this->checkCountryCode( $code, 'country.delivery-exclude' ) === true
Please login to merge, or discard this patch.