Passed
Push — master ( f7bbd3...17cd43 )
by Aimeos
04:27
created
lib/mshoplib/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.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Country.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 = strtoupper( $address->getCountryId() );
128
+		}
128 129
 
129 130
 				if( $this->checkCountryCode( $code, 'country.delivery-include' ) === false
130 131
 					|| $this->checkCountryCode( $code, 'country.delivery-exclude' ) === true
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Catalog/Manager/StandardTest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 	public function testRegisterItemFilter()
79 79
 	{
80
-		$callback = function( \Aimeos\MShop\Common\Item\ListRef\Iface $item, $index )
81
-		{
80
+		$callback = function( \Aimeos\MShop\Common\Item\ListRef\Iface $item, $index ) {
82 81
 			return true;
83 82
 		};
84 83
 
@@ -290,8 +289,7 @@  discard block
 block discarded – undo
290 289
 	{
291 290
 		$this->assertEquals( 2, count( $this->object->getTree()->getChildren() ) );
292 291
 
293
-		$callback = function( \Aimeos\MShop\Common\Item\ListRef\Iface $item, $index )
294
-		{
292
+		$callback = function( \Aimeos\MShop\Common\Item\ListRef\Iface $item, $index ) {
295 293
 			return (bool) $index % 2;
296 294
 		};
297 295
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/ProductFreeOptions.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 			foreach( $value as $key => $product ) {
54 54
 				$value[$key] = $this->updatePrice( $product );
55 55
 			}
56
-		}
57
-		else
56
+		} else
58 57
 		{
59 58
 			$value = $this->updatePrice( $value );
60 59
 		}
@@ -130,8 +129,7 @@  discard block
 block discarded – undo
130 129
 	{
131 130
 		$priceManager = \Aimeos\MShop::create( $this->getContext(), 'price' );
132 131
 
133
-		$sortFcn = function( $a, $b ) use( $priceManager, $attrQtys )
134
-		{
132
+		$sortFcn = function( $a, $b ) use( $priceManager, $attrQtys ) {
135 133
 			if( ( $pricesA = $a->getRefItems( 'price', 'default', 'default' ) ) === [] ) {
136 134
 				return 1;
137 135
 			}
@@ -194,8 +192,7 @@  discard block
 block discarded – undo
194 192
 			{
195 193
 				$list = $this->sortByPrice( $list, $attrQtys );
196 194
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, (int) $prodConf[$type] );
197
-			}
198
-			else
195
+			} else
199 196
 			{
200 197
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, 0 );
201 198
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/LocaleRemoveCharConstraints.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 		) {
54 54
 			$this->execute( 'ALTER TABLE "mshop_locale" DROP FOREIGN KEY "fk_msloc_langid"', 'db-locale' );
55 55
 			$this->status( 'done' );
56
-		}
57
-		else
56
+		} else
58 57
 		{
59 58
 			$this->status( 'OK' );
60 59
 		}
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
 		) {
67 66
 			$this->execute( 'ALTER TABLE "mshop_locale" DROP FOREIGN KEY "fk_msloc_currid"', 'db-locale' );
68 67
 			$this->status( 'done' );
69
-		}
70
-		else
68
+		} else
71 69
 		{
72 70
 			$this->status( 'OK' );
73 71
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/data/text.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * @copyright Aimeos (aimeos.org), 2015-2018
7 7
  */
8 8
 
9
-return array (
10
-	'text/type' => array (
9
+return array(
10
+	'text/type' => array(
11 11
 		'attribute/name' => array( 'domain' => 'attribute', 'code' => 'name', 'label' => 'Name', 'status' => 1 ),
12 12
 		'attribute/short' => array( 'domain' => 'attribute', 'code' => 'short', 'label' => 'Short description', 'status' => 1 ),
13 13
 		'attribute/long' => array( 'domain' => 'attribute', 'code' => 'long', 'label' => 'Long description', 'status' => 1 ),
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 		'supplier/long' => array( 'domain' => 'supplier', 'code' => 'long', 'label' => 'Long description', 'status' => 1 ),
49 49
 	),
50 50
 
51
-	'text' => array (
51
+	'text' => array(
52 52
 
53 53
 //supplier
54
-		'text/supplier/description' => array( 'langid' => null, 'type' => 'description', 'domain' => 'supplier', 'label' => 'supplier/description', 'content' => 'Supplier description', 'status' => 1),
54
+		'text/supplier/description' => array( 'langid' => null, 'type' => 'description', 'domain' => 'supplier', 'label' => 'supplier/description', 'content' => 'Supplier description', 'status' => 1 ),
55 55
 //ATTR
56 56
 //size
57 57
 		'text/size/XS' => array( 'langid' => null, 'type' => 'name', 'domain' => 'attribute', 'label' => 'size/XS', 'content' => 'XS', 'status' => 1 ),
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/data/customer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 				'customer.address.telefax' => '055544332212', 'customer.address.website' => 'www.example.com',
81 81
 				'customer.address.longitude' => '10.5', 'customer.address.latitude' => '51.0',
82 82
 				'customer.address.position' => '0',
83
-			],[
83
+			], [
84 84
 				'customer.address.company' => 'Example company LLC', 'customer.address.vatid' => 'DE999999999',
85 85
 				'customer.address.salutation' => 'mr', 'customer.address.title' => 'Dr.',
86 86
 				'customer.address.firstname' => 'Good', 'customer.address.lastname' => 'Unittest',
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->saveItem( $groupManager->createItem()->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/unittest/data/product.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -352,7 +352,7 @@
 block discarded – undo
352 352
 					'product.lists.type' => 'default', 'product.lists.position' => 2, 'ref' => 'Unittest: Test Sub 2',
353 353
 				], [
354 354
 					'product.lists.type' => 'default', 'product.lists.position' => 3, 'ref' => 'Unittest: Test Sub 3',
355
-				],[
355
+				], [
356 356
 					'product.lists.type' => 'default', 'product.lists.position' => 4, 'ref' => 'Unittest: Test Sub 4',
357 357
 				], [
358 358
 					'product.lists.type' => 'default', 'product.lists.position' => 5, 'ref' => 'Unittest: Test Sub 5',
Please login to merge, or discard this patch.