Completed
Push — master ( 815faa...197710 )
by Aimeos
07:55
created
lib/mwlib/src/MW/View/Helper/Response/Standard.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param string $path Path to the directory
70 70
 	 * @return void
71 71
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
72
-	*/
72
+	 */
73 73
 	public function mkdir( $path )
74 74
 	{
75 75
 		if( @mkdir( $this->basepath . $path ) === false ) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @param string $path Path to the directory
86 86
 	 * @return void
87 87
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
88
-	*/
88
+	 */
89 89
 	public function rmdir( $path )
90 90
 	{
91 91
 		if( @rmdir( $this->basepath . $path ) === false ) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 	 * @return self
153 153
 	 * @throws \InvalidArgumentException for invalid header names or values.
154 154
 	 */
155
-	public function withHeader($name, $value )
155
+	public function withHeader( $name, $value )
156 156
 	{
157 157
 		$this->response = $this->response->withHeader( $name, $value );
158 158
 		return $this;
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 * Return an instance with the provided value replacing the specified header.
171 171
 	 *
172 172
 	 * @param string $name Case-insensitive header field name.
173
-	 * @param string|string[] $value Header value(s).
173
+	 * @param string $value Header value(s).
174 174
 	 * @return self
175 175
 	 * @throws \InvalidArgumentException for invalid header names or values.
176 176
 	 */
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	 * Return an instance with the specified header appended with the given value.
186 186
 	 *
187 187
 	 * @param string $name Case-insensitive header field name to add.
188
-	 * @param string|string[] $value Header value(s).
188
+	 * @param string $value Header value(s).
189 189
 	 * @return self
190 190
 	 */
191 191
 	public function withAddedHeader( $name, $value )
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Weight.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			}
106 106
 		}
107 107
 
108
-		if ($this->checkWeightScale( $this->getWeight( $prodMap ) ) === false) {
108
+		if( $this->checkWeightScale( $this->getWeight( $prodMap ) ) === false ) {
109 109
 			return false;
110 110
 		}
111 111
 
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
 		$min = $this->getConfigValue( array( 'weight.min' ) );
125 125
 		$max = $this->getConfigValue( array( 'weight.max' ) );
126 126
 
127
-		if( $min !== null && ( (float) $min) > $basketWeight ) {
127
+		if( $min !== null && ( (float) $min ) > $basketWeight ) {
128 128
 			return false;
129 129
 		}
130 130
 
131
-		if( $max !== null && ( (float) $max) < $basketWeight ) {
131
+		if( $max !== null && ( (float) $max ) < $basketWeight ) {
132 132
 			return false;
133 133
 		}
134 134
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		$search->setSlice( 0, 0x7fffffff ); // if more than 100 products are in the basket
175 175
 
176 176
 		foreach( $propertyManager->searchItems( $search ) as $property ) {
177
-			$weight += ((float) $property->getValue()) * $prodMap[$prodIds[$property->getParentId()]];
177
+			$weight += ( (float) $property->getValue() ) * $prodMap[$prodIds[$property->getParentId()]];
178 178
 		}
179 179
 
180 180
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,9 +97,11 @@
 block discarded – undo
97 97
 			$code = $basketItem->getProductCode();
98 98
 			$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
99 99
 
100
-			foreach( $basketItem->getProducts() as $prodItem ) // calculate bundled products
100
+			foreach( $basketItem->getProducts() as $prodItem ) {
101
+				// calculate bundled products
101 102
 			{
102 103
 				$qty = $prodItem->getQuantity();
104
+			}
103 105
 				$code = $prodItem->getProductCode();
104 106
 				$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
105 107
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/ProductMigratePropertyTypeDomain.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
 			$this->setCode( $key );
68 68
 			$this->values['id'] = $this->values['code'];
69 69
 			$this->modified = false;
70
-		}
71
-		else
70
+		} else
72 71
 		{
73 72
 			$this->values['id'] = null;
74 73
 			$this->modified = true;
Please login to merge, or discard this patch.
lib/mwlib/src/MW/MQueue/Standard.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,9 +32,12 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		parent::__construct( $config );
34 34
 
35
-		try {
35
+		try
36
+		{
36 37
 			$this->conn = $this->createConnection();
37
-		} catch( \Aimeos\MW\DB\Exception $e ) {
38
+		}
39
+		catch( \Aimeos\MW\DB\Exception $e )
40
+		{
38 41
 			throw new \Aimeos\MW\MQueue\Exception( $e->getMessage() );
39 42
 		}
40 43
 	}
@@ -85,8 +88,7 @@  discard block
 block discarded – undo
85 88
 		{
86 89
 			$dsn .= isset( $host ) ? ';host=' . $host : '';
87 90
 			$dsn .= isset( $port ) ? ';port=' . $port : '';
88
-		}
89
-		else
91
+		} else
90 92
 		{
91 93
 			$dsn .= ';unix_socket=' . $sock;
92 94
 		}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,15 +80,15 @@
 block discarded – undo
80 80
 		$sock = $this->getConfig( 'db/socket' );
81 81
 		$dbase = $this->getConfig( 'db/database', 'aimeos' );
82 82
 
83
-		$dsn = $adapter . ':dbname=' . $dbase;
83
+		$dsn = $adapter.':dbname='.$dbase;
84 84
 		if( $sock == null )
85 85
 		{
86
-			$dsn .= isset( $host ) ? ';host=' . $host : '';
87
-			$dsn .= isset( $port ) ? ';port=' . $port : '';
86
+			$dsn .= isset( $host ) ? ';host='.$host : '';
87
+			$dsn .= isset( $port ) ? ';port='.$port : '';
88 88
 		}
89 89
 		else
90 90
 		{
91
-			$dsn .= ';unix_socket=' . $sock;
91
+			$dsn .= ';unix_socket='.$sock;
92 92
 		}
93 93
 
94 94
 		$attr = array(
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Context/Item/Standard.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param string $path Path to the directory
70 70
 	 * @return void
71 71
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
72
-	*/
72
+	 */
73 73
 	public function mkdir( $path )
74 74
 	{
75 75
 		if( @mkdir( $this->basepath . $path ) === false ) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @param string $path Path to the directory
86 86
 	 * @return void
87 87
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
88
-	*/
88
+	 */
89 89
 	public function rmdir( $path )
90 90
 	{
91 91
 		if( @rmdir( $this->basepath . $path ) === false ) {
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Context/Item/Iface.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param string $path Path to the directory
70 70
 	 * @return void
71 71
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
72
-	*/
72
+	 */
73 73
 	public function mkdir( $path )
74 74
 	{
75 75
 		if( @mkdir( $this->basepath . $path ) === false ) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @param string $path Path to the directory
86 86
 	 * @return void
87 87
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
88
-	*/
88
+	 */
89 89
 	public function rmdir( $path )
90 90
 	{
91 91
 		if( @rmdir( $this->basepath . $path ) === false ) {
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
@@ -618,7 +618,9 @@  discard block
 block discarded – undo
618 618
 			$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $orderAddressDelivery->getCountryId();
619 619
 			$values['PAYMENTREQUEST_0_SHIPTOZIP'] = $orderAddressDelivery->getPostal();
620 620
 		}
621
-		catch( \Exception $e ) {; } // If no address is available
621
+		catch( \Exception $e )
622
+		{
623
+; } // If no address is available
622 624
 
623 625
 
624 626
 		$lastPos = 0;
@@ -656,7 +658,9 @@  discard block
 block discarded – undo
656 658
 			$values['L_SHIPPINGOPTIONNAME0'] = $orderServiceDeliveryItem->getCode();
657 659
 			$values['L_SHIPPINGOPTIONISDEFAULT0'] = 'true';
658 660
 		}
659
-		catch( \Exception $e ) { ; } // If no delivery service is available
661
+		catch( \Exception $e )
662
+		{
663
+; } // If no delivery service is available
660 664
 
661 665
 
662 666
 		$price = $orderBase->getPrice();
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 
475 475
 		if( $rvals['ACK'] !== 'Success' )
476 476
 		{
477
-			$msg = 'PayPal Express: method = ' . $method . ', order ID = ' . $orderid . ', response = ' . print_r( $rvals, true );
477
+			$msg = 'PayPal Express: method = '.$method.', order ID = '.$orderid.', response = '.print_r( $rvals, true );
478 478
 			$this->getContext()->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::WARN );
479 479
 
480 480
 			if( $rvals['ACK'] !== 'SuccessWithWarning' )
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 						break;
554 554
 					}
555 555
 
556
-					$str = 'PayPal Express: order ID = ' . $invoice->getId() . ', PENDINGREASON = ' . $response['PENDINGREASON'];
556
+					$str = 'PayPal Express: order ID = '.$invoice->getId().', PENDINGREASON = '.$response['PENDINGREASON'];
557 557
 					$this->getContext()->getLogger()->log( $str, \Aimeos\MW\Logger\Base::INFO );
558 558
 				}
559 559
 
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 				break;
588 588
 
589 589
 			default:
590
-				$str = 'PayPal Express: order ID = ' . $invoice->getId() . ', response = ' . print_r( $response, true );
590
+				$str = 'PayPal Express: order ID = '.$invoice->getId().', response = '.print_r( $response, true );
591 591
 				$this->getContext()->getLogger()->log( $str, \Aimeos\MW\Logger\Base::INFO );
592 592
 		}
593 593
 	}
@@ -611,8 +611,8 @@  discard block
 block discarded – undo
611 611
 
612 612
 			/* setting up the shipping address details (ReviewOrder) */
613 613
 			$values['ADDROVERRIDE'] = 1;
614
-			$values['PAYMENTREQUEST_0_SHIPTONAME'] = $orderAddressDelivery->getFirstName() . ' ' . $orderAddressDelivery->getLastName();
615
-			$values['PAYMENTREQUEST_0_SHIPTOSTREET'] = $orderAddressDelivery->getAddress1() . ' ' . $orderAddressDelivery->getAddress2() . ' ' . $orderAddressDelivery->getAddress3();
614
+			$values['PAYMENTREQUEST_0_SHIPTONAME'] = $orderAddressDelivery->getFirstName().' '.$orderAddressDelivery->getLastName();
615
+			$values['PAYMENTREQUEST_0_SHIPTOSTREET'] = $orderAddressDelivery->getAddress1().' '.$orderAddressDelivery->getAddress2().' '.$orderAddressDelivery->getAddress3();
616 616
 			$values['PAYMENTREQUEST_0_SHIPTOCITY'] = $orderAddressDelivery->getCity();
617 617
 			$values['PAYMENTREQUEST_0_SHIPTOSTATE'] = $orderAddressDelivery->getState();
618 618
 			$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $orderAddressDelivery->getCountryId();
@@ -628,10 +628,10 @@  discard block
 block discarded – undo
628 628
 			$lastPos = $product->getPosition() - 1;
629 629
 			$deliveryPrice->setCosts( $deliveryPrice->getCosts() + $price->getCosts() * $product->getQuantity() );
630 630
 
631
-			$values['L_PAYMENTREQUEST_0_NUMBER' . $lastPos] = $product->getId();
632
-			$values['L_PAYMENTREQUEST_0_NAME' . $lastPos] = $product->getName();
633
-			$values['L_PAYMENTREQUEST_0_QTY' . $lastPos] = $product->getQuantity();
634
-			$values['L_PAYMENTREQUEST_0_AMT' . $lastPos] = $this->getAmount( $price, false );
631
+			$values['L_PAYMENTREQUEST_0_NUMBER'.$lastPos] = $product->getId();
632
+			$values['L_PAYMENTREQUEST_0_NAME'.$lastPos] = $product->getName();
633
+			$values['L_PAYMENTREQUEST_0_QTY'.$lastPos] = $product->getQuantity();
634
+			$values['L_PAYMENTREQUEST_0_AMT'.$lastPos] = $this->getAmount( $price, false );
635 635
 		}
636 636
 
637 637
 
@@ -639,9 +639,9 @@  discard block
 block discarded – undo
639 639
 		if( ( $paymentCosts = $this->getAmount( $price ) ) > '0.00' )
640 640
 		{
641 641
 			$lastPos++;
642
-			$values['L_PAYMENTREQUEST_0_NAME' . $lastPos] = $this->getContext()->getI18n()->dt( 'mshop', 'Payment costs' );
643
-			$values['L_PAYMENTREQUEST_0_QTY' . $lastPos] = '1';
644
-			$values['L_PAYMENTREQUEST_0_AMT' . $lastPos] = $paymentCosts;
642
+			$values['L_PAYMENTREQUEST_0_NAME'.$lastPos] = $this->getContext()->getI18n()->dt( 'mshop', 'Payment costs' );
643
+			$values['L_PAYMENTREQUEST_0_QTY'.$lastPos] = '1';
644
+			$values['L_PAYMENTREQUEST_0_AMT'.$lastPos] = $paymentCosts;
645 645
 		}
646 646
 
647 647
 
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
 			$values['L_SHIPPINGOPTIONNAME0'] = $orderServiceDeliveryItem->getCode();
659 659
 			$values['L_SHIPPINGOPTIONISDEFAULT0'] = 'true';
660 660
 		}
661
-		catch( \Exception $e ) { ; } // If no delivery service is available
661
+		catch( \Exception $e ) {; } // If no delivery service is available
662 662
 
663 663
 
664 664
 		$price = $orderBase->getPrice();
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/TextListAddTestData.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		$this->additional->setEditor( 'core:unittest' );
61 61
 
62 62
 		$ds = DIRECTORY_SEPARATOR;
63
-		$path = __DIR__ . $ds . 'data' . $ds . 'text-list.php';
63
+		$path = __DIR__.$ds.'data'.$ds.'text-list.php';
64 64
 
65 65
 		if( ( $testdata = include( $path ) ) == false ) {
66 66
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for text list domain', $path ) );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 		$refIds = array();
109 109
 		foreach( $result as $item ) {
110
-			$refIds['media/' . $item->getUrl()] = $item->getId();
110
+			$refIds['media/'.$item->getUrl()] = $item->getId();
111 111
 		}
112 112
 
113 113
 		return $refIds;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$parentIds = array();
144 144
 		foreach( $textManager->searchItems( $search ) as $item ) {
145
-			$parentIds['text/' . $item->getLabel()] = $item->getId();
145
+			$parentIds['text/'.$item->getLabel()] = $item->getId();
146 146
 		}
147 147
 
148 148
 		$tListTypeIds = array();
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/CatalogListAddTestData.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		$this->additional->setEditor( 'core:unittest' );
61 61
 
62 62
 		$ds = DIRECTORY_SEPARATOR;
63
-		$path = __DIR__ . $ds . 'data' . $ds . 'catalog-list.php';
63
+		$path = __DIR__.$ds.'data'.$ds.'catalog-list.php';
64 64
 
65 65
 		if( ( $testdata = include( $path ) ) == false ) {
66 66
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for catalog list domain', $path ) );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 		$refIds = array();
109 109
 		foreach( $textManager->searchItems( $search ) as $item ) {
110
-			$refIds['text/' . $item->getLabel()] = $item->getId();
110
+			$refIds['text/'.$item->getLabel()] = $item->getId();
111 111
 		}
112 112
 
113 113
 		return $refIds;
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 		$refIds = array();
141 141
 		foreach( $mediaManager->searchItems( $search ) as $item ) {
142
-			$refIds['media/' . $item->getUrl()] = $item->getId();
142
+			$refIds['media/'.$item->getUrl()] = $item->getId();
143 143
 		}
144 144
 
145 145
 		return $refIds;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 		$refIds = array();
173 173
 		foreach( $productManager->searchItems( $search ) as $item ) {
174
-			$refIds['product/' . $item->getCode()] = $item->getId();
174
+			$refIds['product/'.$item->getCode()] = $item->getId();
175 175
 		}
176 176
 
177 177
 		return $refIds;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
 		$parentIds = array();
208 208
 		foreach( $catalogManager->searchItems( $search ) as $item ) {
209
-			$parentIds['catalog/' . $item->getCode()] = $item->getId();
209
+			$parentIds['catalog/'.$item->getCode()] = $item->getId();
210 210
 		}
211 211
 
212 212
 		$listItemTypeIds = array();
Please login to merge, or discard this patch.