Completed
Push — master ( 7ac949...d0dda4 )
by Aimeos
11:16
created
lib/mshoplib/src/MShop/Service/Provider/Payment/PayPalExpress.php 3 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -656,7 +656,9 @@  discard block
 block discarded – undo
656 656
 			$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $orderAddressDelivery->getCountryId();
657 657
 			$values['PAYMENTREQUEST_0_SHIPTOZIP'] = $orderAddressDelivery->getPostal();
658 658
 		}
659
-		catch( \Exception $e ) { ; } // If no address is available
659
+		catch( \Exception $e )
660
+		{
661
+; } // If no address is available
660 662
 
661 663
 
662 664
 		$lastPos = 0;
@@ -696,7 +698,9 @@  discard block
 block discarded – undo
696 698
 			$values['L_SHIPPINGOPTIONNAME0'] = $orderServiceDeliveryItem->getName();
697 699
 			$values['L_SHIPPINGOPTIONISDEFAULT0'] = 'true';
698 700
 		}
699
-		catch( \Exception $e ) { ; } // If no delivery service is available
701
+		catch( \Exception $e )
702
+		{
703
+; } // If no delivery service is available
700 704
 
701 705
 
702 706
 		$price = $orderBase->getPrice();
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 	 * Returns the configuration attribute definitions of the provider to generate a list of available fields and
100 100
 	 * rules for the value of each field in the administration interface.
101 101
 	 *
102
-	 * @return array List of attribute definitions implementing \Aimeos\MW\Common\Critera\Attribute\Iface
102
+	 * @return \Aimeos\MW\Criteria\Attribute\Iface[] List of attribute definitions implementing \Aimeos\MW\Common\Critera\Attribute\Iface
103 103
 	 */
104 104
 	public function getConfigBE()
105 105
 	{
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 
507 507
 		if( $rvals['ACK'] !== 'Success' )
508 508
 		{
509
-			$msg = 'PayPal Express: method = ' . $method . ', order ID = ' . $orderid . ', response = ' . print_r( $rvals, true );
509
+			$msg = 'PayPal Express: method = '.$method.', order ID = '.$orderid.', response = '.print_r( $rvals, true );
510 510
 			$this->getContext()->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::WARN, 'core/service/payment' );
511 511
 
512 512
 			if( $rvals['ACK'] !== 'SuccessWithWarning' )
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 						break;
586 586
 					}
587 587
 
588
-					$str = 'PayPal Express: order ID = ' . $invoice->getId() . ', PENDINGREASON = ' . $response['PENDINGREASON'];
588
+					$str = 'PayPal Express: order ID = '.$invoice->getId().', PENDINGREASON = '.$response['PENDINGREASON'];
589 589
 					$this->getContext()->getLogger()->log( $str, \Aimeos\MW\Logger\Base::INFO, 'core/service/payment' );
590 590
 				}
591 591
 
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
 				break;
620 620
 
621 621
 			default:
622
-				$str = 'PayPal Express: order ID = ' . $invoice->getId() . ', response = ' . print_r( $response, true );
622
+				$str = 'PayPal Express: order ID = '.$invoice->getId().', response = '.print_r( $response, true );
623 623
 				$this->getContext()->getLogger()->log( $str, \Aimeos\MW\Logger\Base::INFO, 'core/service/payment' );
624 624
 		}
625 625
 	}
@@ -644,14 +644,14 @@  discard block
 block discarded – undo
644 644
 			/* setting up the address details */
645 645
 			$values['NOSHIPPING'] = $this->getConfigValue( array( 'paypalexpress.NoShipping' ), 1 );
646 646
 			$values['ADDROVERRIDE'] = $this->getConfigValue( array( 'paypalexpress.AddrOverride' ), 0 );
647
-			$values['PAYMENTREQUEST_0_SHIPTONAME'] = $orderAddressDelivery->getFirstName() . ' ' . $orderAddressDelivery->getLastName();
648
-			$values['PAYMENTREQUEST_0_SHIPTOSTREET'] = $orderAddressDelivery->getAddress1() . ' ' . $orderAddressDelivery->getAddress2() . ' ' . $orderAddressDelivery->getAddress3();
647
+			$values['PAYMENTREQUEST_0_SHIPTONAME'] = $orderAddressDelivery->getFirstName().' '.$orderAddressDelivery->getLastName();
648
+			$values['PAYMENTREQUEST_0_SHIPTOSTREET'] = $orderAddressDelivery->getAddress1().' '.$orderAddressDelivery->getAddress2().' '.$orderAddressDelivery->getAddress3();
649 649
 			$values['PAYMENTREQUEST_0_SHIPTOCITY'] = $orderAddressDelivery->getCity();
650 650
 			$values['PAYMENTREQUEST_0_SHIPTOSTATE'] = $orderAddressDelivery->getState();
651 651
 			$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $orderAddressDelivery->getCountryId();
652 652
 			$values['PAYMENTREQUEST_0_SHIPTOZIP'] = $orderAddressDelivery->getPostal();
653 653
 		}
654
-		catch( \Exception $e ) { ; } // If no address is available
654
+		catch( \Exception $e ) {; } // If no address is available
655 655
 
656 656
 
657 657
 		$lastPos = 0;
@@ -663,10 +663,10 @@  discard block
 block discarded – undo
663 663
 			$deliveryPrice = clone $price;
664 664
 			$deliveryPrices = $this->addPrice( $deliveryPrices, $deliveryPrice->setValue( '0.00' ), $product->getQuantity() );
665 665
 
666
-			$values['L_PAYMENTREQUEST_0_NUMBER' . $lastPos] = $product->getId();
667
-			$values['L_PAYMENTREQUEST_0_NAME' . $lastPos] = $product->getName();
668
-			$values['L_PAYMENTREQUEST_0_QTY' . $lastPos] = $product->getQuantity();
669
-			$values['L_PAYMENTREQUEST_0_AMT' . $lastPos] = $this->getAmount( $price, false );
666
+			$values['L_PAYMENTREQUEST_0_NUMBER'.$lastPos] = $product->getId();
667
+			$values['L_PAYMENTREQUEST_0_NAME'.$lastPos] = $product->getName();
668
+			$values['L_PAYMENTREQUEST_0_QTY'.$lastPos] = $product->getQuantity();
669
+			$values['L_PAYMENTREQUEST_0_AMT'.$lastPos] = $this->getAmount( $price, false );
670 670
 		}
671 671
 
672 672
 
@@ -674,9 +674,9 @@  discard block
 block discarded – undo
674 674
 		if( ( $paymentCosts = $this->getAmount( $price ) ) > '0.00' )
675 675
 		{
676 676
 			$lastPos++;
677
-			$values['L_PAYMENTREQUEST_0_NAME' . $lastPos] = $this->getContext()->getI18n()->dt( 'mshop', 'Payment costs' );
678
-			$values['L_PAYMENTREQUEST_0_QTY' . $lastPos] = '1';
679
-			$values['L_PAYMENTREQUEST_0_AMT' . $lastPos] = $paymentCosts;
677
+			$values['L_PAYMENTREQUEST_0_NAME'.$lastPos] = $this->getContext()->getI18n()->dt( 'mshop', 'Payment costs' );
678
+			$values['L_PAYMENTREQUEST_0_QTY'.$lastPos] = '1';
679
+			$values['L_PAYMENTREQUEST_0_AMT'.$lastPos] = $paymentCosts;
680 680
 		}
681 681
 
682 682
 
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 			$values['L_SHIPPINGOPTIONNAME0'] = $orderServiceDeliveryItem->getName();
696 696
 			$values['L_SHIPPINGOPTIONISDEFAULT0'] = 'true';
697 697
 		}
698
-		catch( \Exception $e ) { ; } // If no delivery service is available
698
+		catch( \Exception $e ) {; } // If no delivery service is available
699 699
 
700 700
 
701 701
 		$price = $orderBase->getPrice();
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Catalog/Manager/Base.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 	 * Creates the catalog item objects.
66 66
 	 *
67 67
 	 * @param array $itemMap Associative list of catalog ID / tree node pairs
68
-	 * @param array $domains List of domains (e.g. text, media) whose items should be attached to the catalog items
68
+	 * @param string[] $domains List of domains (e.g. text, media) whose items should be attached to the catalog items
69 69
 	 * @param string $prefix Domain prefix
70 70
 	 * @param array $local Associative list of IDs as keys and the associative array of items as values
71 71
 	 * @return array List of items implementing \Aimeos\MShop\Catalog\Item\Iface
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Statement/Base.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,9 +132,9 @@
 block discarded – undo
132 132
 					&& ( $count += substr_count( $pr, '\'' ) ) % 2 !== 0 )
133 133
 				{
134 134
 					if( ( $part = next( $parts ) ) === false ) {
135
-						throw new \Aimeos\MW\DB\Exception( 'Number of apostrophes don\'t match: ' . $sql );
135
+						throw new \Aimeos\MW\DB\Exception( 'Number of apostrophes don\'t match: '.$sql );
136 136
 					}
137
-					$temp .= '?' . $part;
137
+					$temp .= '?'.$part;
138 138
 				}
139 139
 				$result[] = $temp;
140 140
 			}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
 	 * Reconnects to the database server if not in a transaction
175 175
 	 *
176 176
 	 * @param \Exception $e Exception to throw if a transaction is running
177
-	 * @return \Aimeos\MW\DB\Statement\Iface Object for method chaining
177
+	 * @return Base Object for method chaining
178 178
 	 * @throws \Exception If a transaction is running
179 179
 	 */
180 180
 	protected function reconnect( \Exception $e )
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Order/Manager/Base/StandardTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@
 block discarded – undo
335 335
 
336 336
 	public function testSearchItemsDefault()
337 337
 	{
338
-		$search = $this->object->createSearch(  true );
338
+		$search = $this->object->createSearch( true );
339 339
 		$items = $this->object->searchItems( $search );
340 340
 
341 341
 		$this->assertEquals( 0, count( $items ) );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Common/Manager/Type/Base.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -200,6 +200,7 @@
 block discarded – undo
200 200
 	 * @param \Aimeos\MW\Criteria\Iface $search Search criteria object
201 201
 	 * @param string[] $ref List of domains to fetch list items and referenced items for
202 202
 	 * @param integer|null &$total Number of items that are available in total
203
+	 * @param integer $total
203 204
 	 * @return array List of type items implementing \Aimeos\MShop\Common\Item\Type\Iface
204 205
 	 */
205 206
 	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	public function createItem()
62 62
 	{
63 63
 		$values = array(
64
-			$this->prefix . 'siteid' => $this->getContext()->getLocale()->getSiteId(),
64
+			$this->prefix.'siteid' => $this->getContext()->getLocale()->getSiteId(),
65 65
 		);
66 66
 		return $this->createItemBase( $values );
67 67
 	}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 			}
115 115
 
116 116
 			$time = date( 'Y-m-d H:i:s', time() );
117
-			$stmt = $conn->create( $this->getSqlConfig( $this->getConfigPath() . $type ) );
117
+			$stmt = $conn->create( $this->getSqlConfig( $this->getConfigPath().$type ) );
118 118
 
119 119
 			$stmt->bind( 1, $item->getCode(), \Aimeos\MW\DB\Statement\Base::PARAM_STR );
120 120
 			$stmt->bind( 2, $item->getDomain(), \Aimeos\MW\DB\Statement\Base::PARAM_STR );
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			if( $fetch === true )
136 136
 			{
137 137
 				if( $id === null ) {
138
-					$item->setId( $this->newId( $conn, $this->getConfigPath() . 'newid' ) );
138
+					$item->setId( $this->newId( $conn, $this->getConfigPath().'newid' ) );
139 139
 				} else {
140 140
 					$item->setId( $id ); // modified false
141 141
 				}
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function deleteItems( array $ids )
160 160
 	{
161
-		$this->deleteItemsBase( $ids, $this->getConfigPath() . 'delete' );
161
+		$this->deleteItemsBase( $ids, $this->getConfigPath().'delete' );
162 162
 	}
163 163
 
164 164
 
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
 	public function findItem( $code, array $ref = [], $domain = 'product', $type = null )
175 175
 	{
176 176
 		$find = array(
177
-			$this->prefix . 'code' => $code,
178
-			$this->prefix . 'domain' => $domain,
177
+			$this->prefix.'code' => $code,
178
+			$this->prefix.'domain' => $domain,
179 179
 		);
180 180
 		return $this->findItemBase( $find, $ref );
181 181
 	}
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 */
192 192
 	public function getItem( $id, array $ref = [], $default = false )
193 193
 	{
194
-		return $this->getItemBase( $this->prefix . 'id', $id, $ref, $default );
194
+		return $this->getItemBase( $this->prefix.'id', $id, $ref, $default );
195 195
 	}
196 196
 
197 197
 
@@ -220,13 +220,13 @@  discard block
 block discarded – undo
220 220
 			}
221 221
 
222 222
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
223
-			$cfgPathSearch = $this->getConfigPath() . 'search';
224
-			$cfgPathCount = $this->getConfigPath() . 'count';
223
+			$cfgPathSearch = $this->getConfigPath().'search';
224
+			$cfgPathCount = $this->getConfigPath().'count';
225 225
 			$required = array( trim( $this->prefix, '.' ) );
226 226
 
227 227
 			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
228 228
 			while( ( $row = $results->fetch() ) !== false ) {
229
-				$items[$row[$this->prefix . 'id']] = $this->createItemBase( $row );
229
+				$items[$row[$this->prefix.'id']] = $this->createItemBase( $row );
230 230
 			}
231 231
 
232 232
 			$dbm->release( $conn, $dbname );
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 */
251 251
 	public function getSubManager( $manager, $name = null )
252 252
 	{
253
-		return $this->getSubManagerBase( 'common', 'type/' . $manager, $name );
253
+		return $this->getSubManagerBase( 'common', 'type/'.$manager, $name );
254 254
 	}
255 255
 
256 256
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Base.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
 	 * Processes the order
181 181
 	 *
182 182
 	 * @param \Aimeos\MShop\Order\Item\Iface $order Order invoice object to process
183
-	 * @param array $params Request parameter if available
183
+	 * @param string[] $params Request parameter if available
184 184
 	 * @return \Aimeos\MShop\Common\Item\Helper\Form\Standard|null Form object or null
185 185
 	 */
186 186
 	public function process( \Aimeos\MShop\Order\Item\Iface $order, array $params = [] )
Please login to merge, or discard this patch.
controller/common/tests/TestHelperCntl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		if( !isset( self::$aimeos ) )
50 50
 		{
51
-			require_once dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'Bootstrap.php';
51
+			require_once dirname( dirname( dirname( __DIR__ ) ) ).DIRECTORY_SEPARATOR.'Bootstrap.php';
52 52
 
53 53
 			self::$aimeos = new \Aimeos\Bootstrap( [], false );
54 54
 		}
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 
71 71
 
72 72
 		$paths = $aimeos->getConfigPaths();
73
-		$paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
74
-		$file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser';
73
+		$paths[] = __DIR__.DIRECTORY_SEPARATOR.'config';
74
+		$file = __DIR__.DIRECTORY_SEPARATOR.'confdoc.ser';
75 75
 
76 76
 		$conf = new \Aimeos\MW\Config\PHPArray( [], $paths );
77 77
 		$conf = new \Aimeos\MW\Config\Decorator\Memory( $conf );
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Common/Factory/Base.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 		{
57 57
 			if( ctype_alnum( $name ) === false )
58 58
 			{
59
-				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
59
+				$classname = is_string( $name ) ? $classprefix.$name : '<not a string>';
60 60
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
61 61
 			}
62 62
 
63
-			$classname = $classprefix . $name;
63
+			$classname = $classprefix.$name;
64 64
 
65 65
 			if( class_exists( $classname ) === false ) {
66 66
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		 * @category Developer
120 120
 		 */
121 121
 		$decorators = $config->get( 'controller/jobs/common/decorators/default', [] );
122
-		$excludes = $config->get( 'controller/jobs/' . $domain . '/decorators/excludes', [] );
122
+		$excludes = $config->get( 'controller/jobs/'.$domain.'/decorators/excludes', [] );
123 123
 
124 124
 		foreach( $decorators as $key => $name )
125 125
 		{
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
 		$controller = self::addDecorators( $context, $aimeos, $controller, $decorators, $classprefix );
133 133
 
134 134
 		$classprefix = '\\Aimeos\\Controller\\Jobs\\Common\\Decorator\\';
135
-		$decorators = $config->get( 'controller/jobs/' . $domain . '/decorators/global', [] );
135
+		$decorators = $config->get( 'controller/jobs/'.$domain.'/decorators/global', [] );
136 136
 		$controller = self::addDecorators( $context, $aimeos, $controller, $decorators, $classprefix );
137 137
 
138
-		$classprefix = '\\Aimeos\\Controller\\Jobs\\' . ucfirst( $localClass ) . '\\Decorator\\';
139
-		$decorators = $config->get( 'controller/jobs/' . $domain . '/decorators/local', [] );
138
+		$classprefix = '\\Aimeos\\Controller\\Jobs\\'.ucfirst( $localClass ).'\\Decorator\\';
139
+		$decorators = $config->get( 'controller/jobs/'.$domain.'/decorators/local', [] );
140 140
 		$controller = self::addDecorators( $context, $aimeos, $controller, $decorators, $classprefix );
141 141
 
142 142
 		return $controller;
Please login to merge, or discard this patch.
controller/jobs/tests/TestHelperJobs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		if( !isset( self::$aimeos ) )
50 50
 		{
51
-			require_once dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'Bootstrap.php';
51
+			require_once dirname( dirname( dirname( __DIR__ ) ) ).DIRECTORY_SEPARATOR.'Bootstrap.php';
52 52
 
53 53
 			self::$aimeos = new \Aimeos\Bootstrap( [], false );
54 54
 		}
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 
82 82
 
83 83
 		$paths = $aimeos->getConfigPaths();
84
-		$paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
85
-		$file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser';
84
+		$paths[] = __DIR__.DIRECTORY_SEPARATOR.'config';
85
+		$file = __DIR__.DIRECTORY_SEPARATOR.'confdoc.ser';
86 86
 
87 87
 		$conf = new \Aimeos\MW\Config\PHPArray( [], $paths );
88 88
 		$conf = new \Aimeos\MW\Config\Decorator\Memory( $conf );
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		$ctx->setConfig( $conf );
91 91
 
92 92
 
93
-		$logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG );
93
+		$logger = new \Aimeos\MW\Logger\File( $site.'.log', \Aimeos\MW\Logger\Base::DEBUG );
94 94
 		$ctx->setLogger( $logger );
95 95
 
96 96
 
Please login to merge, or discard this patch.