Passed
Push — master ( 50e989...69e622 )
by Aimeos
05:21
created
lib/mshoplib/src/MShop/Service/Provider/Payment/DirectDebit.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@
 block discarded – undo
81 81
 				$feconfig['directdebit.accountowner']['default'] = $fn . ' ' . $ln;
82 82
 			}
83 83
 		}
84
-		catch( \Aimeos\MShop\Order\Exception $e ) { ; } // If address isn't available
84
+		catch( \Aimeos\MShop\Order\Exception $e )
85
+		{
86
+; } // If address isn't available
85 87
 
86 88
 		return $this->getConfigItems( $feconfig );
87 89
 	}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 				$feconfig['directdebit.accountowner']['default'] = $fn . ' ' . $ln;
82 82
 			}
83 83
 		}
84
-		catch( \Aimeos\MShop\Order\Exception $e ) { ; } // If address isn't available
84
+		catch( \Aimeos\MShop\Order\Exception $e ) {; } // If address isn't available
85 85
 
86 86
 		return $this->getConfigItems( $feconfig );
87 87
 	}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Catalog/Manager/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -612,7 +612,7 @@
 block discarded – undo
612 612
 			$cfgPathCount = 'mshop/catalog/manager/standard/count';
613 613
 
614 614
 			if( $search->getSortations() === [] ) {
615
-				$search->setSortations( [$search->sort( '+', 'catalog.left')] );
615
+				$search->setSortations( [$search->sort( '+', 'catalog.left' )] );
616 616
 			}
617 617
 
618 618
 			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -719,9 +719,12 @@  discard block
 block discarded – undo
719 719
 
720 720
 		foreach( $sitePath as $siteId )
721 721
 		{
722
-			try {
722
+			try
723
+			{
723 724
 				$path = $this->createTreeManager( $siteId )->getPath( $id );
724
-			} catch( \Exception $e ) {
725
+			}
726
+			catch( \Exception $e )
727
+			{
725 728
 				continue;
726 729
 			}
727 730
 
@@ -756,9 +759,12 @@  discard block
 block discarded – undo
756 759
 
757 760
 		foreach( $sitePath as $siteId )
758 761
 		{
759
-			try {
762
+			try
763
+			{
760 764
 				$node = $this->createTreeManager( $siteId )->getNode( $id, $level, $criteria );
761
-			} catch( \Exception $e ) {
765
+			}
766
+			catch( \Exception $e )
767
+			{
762 768
 				continue;
763 769
 			}
764 770
 
@@ -838,8 +844,7 @@  discard block
 block discarded – undo
838 844
 				if( $child->getParentId() !== $item->getParentId() ) {
839 845
 					$this->moveItem( $child->getId(), $item->getParentId(), $child->getParentId() );
840 846
 				}
841
-			}
842
-			else
847
+			} else
843 848
 			{
844 849
 				$this->insertItem( $child, $item->getId() );
845 850
 			}
@@ -914,8 +919,7 @@  discard block
 block discarded – undo
914 919
 				 * @see mshop/catalog/manager/standard/insert-usage/ansi
915 920
 				 */
916 921
 				$path = 'mshop/catalog/manager/standard/update-usage';
917
-			}
918
-			else
922
+			} else
919 923
 			{
920 924
 				/** mshop/catalog/manager/standard/insert-usage/mysql
921 925
 				 * Updates the config, editor, ctime and mtime value of an inserted record
@@ -971,8 +975,7 @@  discard block
 block discarded – undo
971 975
 			{
972 976
 				$stmt->bind( 5, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
973 977
 				$stmt->bind( 6, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
974
-			}
975
-			else
978
+			} else
976 979
 			{
977 980
 				$stmt->bind( 5, $date ); // ctime
978 981
 				$stmt->bind( 6, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/CategoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		$this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::createManager( $this->context )->createItem();
25 25
 
26 26
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'abcd' );
27
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Category( $provider, $this->context, $this->couponItem, 'abcd');
27
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Category( $provider, $this->context, $this->couponItem, 'abcd' );
28 28
 		$this->object->setObject( $this->object );
29 29
 
30 30
 		$priceManager = \Aimeos\MShop\Factory::createManager( $this->context, 'price' );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/OnceTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	public function testIsAvailable()
44 44
 	{
45 45
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'ABCD' );
46
-		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'ABCD');
46
+		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'ABCD' );
47 47
 		$object->setObject( $object );
48 48
 
49 49
 		$this->assertTrue( $object->isAvailable( $this->orderBase ) );
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	public function testIsAvailableExisting()
54 54
 	{
55 55
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'OPQR' );
56
-		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'OPQR');
56
+		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'OPQR' );
57 57
 		$object->setObject( $object );
58 58
 
59 59
 		$this->assertFalse( $object->isAvailable( $this->orderBase ) );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/SupplierTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		$this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::createManager( $this->context )->createItem();
25 25
 
26 26
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'abcd' );
27
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Supplier( $provider, $this->context, $this->couponItem, 'abcd');
27
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Supplier( $provider, $this->context, $this->couponItem, 'abcd' );
28 28
 		$this->object->setObject( $this->object );
29 29
 
30 30
 		$priceManager = \Aimeos\MShop\Factory::createManager( $this->context, 'price' );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Order/Item/Base/Coupon/Standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 	{
123 123
 		if( (string) $code !== $this->getCode() )
124 124
 		{
125
-			$this->values['order.base.coupon.code'] = (string) $this->checkCode( $code );;
125
+			$this->values['order.base.coupon.code'] = (string) $this->checkCode( $code ); ;
126 126
 			$this->setModified();
127 127
 		}
128 128
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Price/Item/Standard.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@
 block discarded – undo
380 380
 	 *
381 381
 	 * @param boolean $flag True if tax is included in the price value, costs and rebate, false if not
382 382
 	 * @return \Aimeos\MShop\Price\Item\Iface Price item for chaining method calls
383
-	*/
383
+	 */
384 384
 	public function setTaxFlag( $flag )
385 385
 	{
386 386
 		if( (bool) $flag !== $this->getTaxFlag() )
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Payment/PayPalExpress.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -657,7 +657,9 @@  discard block
 block discarded – undo
657 657
 				$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $orderAddressDelivery->getCountryId();
658 658
 				$values['PAYMENTREQUEST_0_SHIPTOZIP'] = $orderAddressDelivery->getPostal();
659 659
 			}
660
-			catch( \Exception $e ) { ; } // If no address is available
660
+			catch( \Exception $e )
661
+			{
662
+; } // If no address is available
661 663
 		}
662 664
 
663 665
 
@@ -710,7 +712,9 @@  discard block
 block discarded – undo
710 712
 					$values['L_SHIPPINGOPTIONISDEFAULT0'] = 'true';
711 713
 				}
712 714
 			}
713
-			catch( \Exception $e ) { ; } // If no delivery service is available
715
+			catch( \Exception $e )
716
+			{
717
+; } // If no delivery service is available
714 718
 		}
715 719
 
716 720
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 				$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $orderAddressDelivery->getCountryId();
666 666
 				$values['PAYMENTREQUEST_0_SHIPTOZIP'] = $orderAddressDelivery->getPostal();
667 667
 			}
668
-			catch( \Exception $e ) { ; } // If no address is available
668
+			catch( \Exception $e ) {; } // If no address is available
669 669
 		}
670 670
 
671 671
 
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 					$values['L_SHIPPINGOPTIONISDEFAULT0'] = 'true';
719 719
 				}
720 720
 			}
721
-			catch( \Exception $e ) { ; } // If no delivery service is available
721
+			catch( \Exception $e ) {; } // If no delivery service is available
722 722
 		}
723 723
 
724 724
 
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
 	{
814 814
 		$response = '';
815 815
 
816
-		if( ( $curl = curl_init() )=== false ) {
816
+		if( ( $curl = curl_init() ) === false ) {
817 817
 			throw new \Aimeos\MShop\Service\Exception( 'Could not initialize curl' );
818 818
 		}
819 819
 
@@ -824,16 +824,16 @@  discard block
 block discarded – undo
824 824
 			curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, strtoupper( $method ) );
825 825
 			curl_setopt( $curl, CURLOPT_POSTFIELDS, $payload );
826 826
 			curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 25 );
827
-			curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );   // return data as string
827
+			curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true ); // return data as string
828 828
 
829 829
 			curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, true );
830 830
 
831
-			if ( ( $response = curl_exec( $curl ) ) === false ) {
831
+			if( ( $response = curl_exec( $curl ) ) === false ) {
832 832
 				throw new \Aimeos\MShop\Service\Exception( sprintf( 'Sending order failed: "%1$s"', curl_error( $curl ) ) );
833 833
 			}
834 834
 
835
-			if ( curl_errno($curl) ) {
836
-				throw new \Aimeos\MShop\Service\Exception( sprintf( 'Error with nr."%1$s" - "%2$s"', curl_errno($curl), curl_error($curl) ) );
835
+			if( curl_errno( $curl ) ) {
836
+				throw new \Aimeos\MShop\Service\Exception( sprintf( 'Error with nr."%1$s" - "%2$s"', curl_errno( $curl ), curl_error( $curl ) ) );
837 837
 			}
838 838
 
839 839
 			curl_close( $curl );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Supplier.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,9 @@
 block discarded – undo
135 135
 				$feconfig['supplier.code']['default'] = [$value => $address] + $feconfig['supplier.code']['default'];
136 136
 			}
137 137
 		}
138
-		catch( \Aimeos\MShop\Order\Exception $e ) {} // If service isn't available
138
+		catch( \Aimeos\MShop\Order\Exception $e )
139
+		{
140
+} // If service isn't available
139 141
 
140 142
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
141 143
 	}
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 			foreach( $addresses as $id => $addr )
76 76
 			{
77
-				$addrId = ( count( $addresses ) > 1) ? $item->getCode() . '-' . $id : $item->getCode();
77
+				$addrId = ( count( $addresses ) > 1 ) ? $item->getCode() . '-' . $id : $item->getCode();
78 78
 
79 79
 				$this->feConfig['supplier.code']['default'][$addrId] = preg_replace( "/\n+/m", "\n", sprintf(
80 80
 					/// Supplier address format with label (%1$s), company (%2$s),
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 					/// address part one (%3$s, e.g street), address part two (%4$s, e.g house number), address part three (%5$s, e.g additional information),
113 113
 					/// postal/zip code (%6$s), city (%7$s), state (%8$s), country ID (%9$s),
114 114
 					/// e-mail (%10$s), phone (%11$s), facsimile/telefax (%12$s), web site (%13$s)
115
-					$context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s'),
115
+					$context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s' ),
116 116
 					$item->getLabel(),
117 117
 					$addr->getCompany(),
118 118
 					$addr->getAddress1(),
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 			$attributes['supplier.address'] = $this->feConfig['supplier.code']['short'][$code];
193 193
 
194 194
 			// remove code attribute for summary page / customer email
195
-			if( $this->getConfigValue('supplier.display-code') == 0 ) {
195
+			if( $this->getConfigValue( 'supplier.display-code' ) == 0 ) {
196 196
 				unset( $attributes['supplier.code'] );
197 197
 			}
198 198
 		}
Please login to merge, or discard this patch.