Passed
Push — master ( f7bbd3...17cd43 )
by Aimeos
04:27
created
controller/jobs/src/Controller/Jobs.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@
 block discarded – undo
124 124
 				$subList = self::createControllers( $it, $context, $aimeos, $pref );
125 125
 
126 126
 				$list = array_merge( $list, $subList );
127
-			}
128
-			else if( $prefix !== '' && $entry->getType() === 'file'
127
+			} else if( $prefix !== '' && $entry->getType() === 'file'
129 128
 				&& $entry->getBaseName( '.php' ) === 'Factory' )
130 129
 			{
131 130
 				$list[$prefix] = self::create( $context, $aimeos, $prefix );
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddProductData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
174 174
 					$refItem = $manager->findItem( $refItem->getCode(), [], $domain, $refItem->getType() );
175 175
 				}
176
-				catch( \Aimeos\MShop\Exception $e ) { ; } // attribute doesn't exist yet
176
+				catch( \Aimeos\MShop\Exception $e ) {; } // attribute doesn't exist yet
177 177
 
178 178
 				$refItem = $this->addRefItems( $refItem, $data );
179 179
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@  discard block
 block discarded – undo
81 81
 		{
82 82
 			$this->addDemoData();
83 83
 			$this->status( 'added' );
84
-		}
85
-		else
84
+		} else
86 85
 		{
87 86
 			$this->status( 'removed' );
88 87
 		}
@@ -173,7 +172,9 @@  discard block
 block discarded – undo
173 172
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
174 173
 					$refItem = $manager->findItem( $refItem->getCode(), [], $domain, $refItem->getType() );
175 174
 				}
176
-				catch( \Aimeos\MShop\Exception $e ) { ; } // attribute doesn't exist yet
175
+				catch( \Aimeos\MShop\Exception $e )
176
+				{
177
+; } // attribute doesn't exist yet
177 178
 
178 179
 				$refItem = $this->addRefItems( $refItem, $data );
179 180
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Context/Item/Standard.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 	 * Returns the message queue manager object.
435 435
 	 *
436 436
 	 * @return \Aimeos\MW\MQueue\Manager\Iface Message queue manager object
437
-	*/
437
+	 */
438 438
 	public function getMessageQueueManager()
439 439
 	{
440 440
 		if( !isset( $this->mqueue ) ) {
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 	 * @param string $resource Resource name, e.g. "mq-email"
452 452
 	 * @param string $queue Message queue name, e.g. "order/email/payment"
453 453
 	 * @return \Aimeos\MW\MQueue\Manager\Iface Message queue object
454
-	*/
454
+	 */
455 455
 	public function getMessageQueue( $resource, $queue )
456 456
 	{
457 457
 		if( !isset( $this->mqueue ) ) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 	 * Returns the process object.
481 481
 	 *
482 482
 	 * @return \Aimeos\MW\Process\Iface Process object
483
-	*/
483
+	 */
484 484
 	public function getProcess()
485 485
 	{
486 486
 		if( !isset( $this->process ) ) {
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/ProductLimit.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,8 +133,7 @@
 block discarded – undo
133 133
 				$this->checkWithoutCurrency( $order, $entry );
134 134
 				$this->checkWithCurrency( $order, $entry );
135 135
 			}
136
-		}
137
-		else
136
+		} else
138 137
 		{
139 138
 			\Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $value );
140 139
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Tree/Node/Standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
 			$this->modified = true;
155 155
 		}
156 156
 
157
-		return $this;;
157
+		return $this; ;
158 158
 	}
159 159
 
160 160
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Weight.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,9 +96,11 @@
 block discarded – undo
96 96
 			$code = $orderProduct->getProductCode();
97 97
 			$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
98 98
 
99
-			foreach( $orderProduct->getProducts() as $prodItem ) // calculate bundled products
99
+			foreach( $orderProduct->getProducts() as $prodItem ) {
100
+				// calculate bundled products
100 101
 			{
101 102
 				$qty = $prodItem->getQuantity();
103
+			}
102 104
 				$code = $prodItem->getProductCode();
103 105
 				$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
104 106
 			}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			}
105 105
 		}
106 106
 
107
-		if ( $this->checkWeightScale( $this->getWeight( $prodMap ) ) === false ) {
107
+		if( $this->checkWeightScale( $this->getWeight( $prodMap ) ) === false ) {
108 108
 			return false;
109 109
 		}
110 110
 
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
 		$min = $this->getConfigValue( array( 'weight.min' ) );
124 124
 		$max = $this->getConfigValue( array( 'weight.max' ) );
125 125
 
126
-		if( $min !== null && ( (float) $min) > $basketWeight ) {
126
+		if( $min !== null && ( (float) $min ) > $basketWeight ) {
127 127
 			return false;
128 128
 		}
129 129
 
130
-		if( $max !== null && ( (float) $max) < $basketWeight ) {
130
+		if( $max !== null && ( (float) $max ) < $basketWeight ) {
131 131
 			return false;
132 132
 		}
133 133
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 		foreach( $manager->searchItems( $search, ['product/property'] ) as $product )
157 157
 		{
158 158
 			foreach( $product->getPropertyItems( 'package-weight' ) as $property ) {
159
-				$weight += ((float) $property->getValue()) * $prodMap[$product->getCode()];
159
+				$weight += ( (float) $property->getValue() ) * $prodMap[$product->getCode()];
160 160
 			}
161 161
 		}
162 162
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Attribute/Standard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
 	{
95 95
 		foreach( ['type', 'code'] as $entry )
96 96
 		{
97
-			if ( !isset($params[$entry]) ) {
98
-				throw new \Aimeos\MW\Common\Exception( sprintf('Required parameter "%1$s" is missing', $entry) );
97
+			if( !isset( $params[$entry] ) ) {
98
+				throw new \Aimeos\MW\Common\Exception( sprintf( 'Required parameter "%1$s" is missing', $entry ) );
99 99
 			}
100 100
 		}
101 101
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/ProductStock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		}
90 90
 
91 91
 		foreach( $this->getStockItems( $productCodes, $stockTypes ) as $stockItem ) {
92
-			$stockMap[ $stockItem->getProductCode() ][ $stockItem->getType() ] = $stockItem->getStocklevel();
92
+			$stockMap[$stockItem->getProductCode()][$stockItem->getType()] = $stockItem->getStocklevel();
93 93
 		}
94 94
 
95 95
 		return $this->checkStockLevels( $order, $stockMap );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 			$type = $orderProduct->getStockType();
118 118
 			$code = $orderProduct->getProductCode();
119 119
 
120
-			if( isset( $stockMap[ $code ] )
120
+			if( isset( $stockMap[$code] )
121 121
 				&& array_key_exists( $type, $stockMap[$code] )
122 122
 			) {
123 123
 				if( ( $stocklevel = $stockMap[$code][$type] ) === null ) {
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Plugin/Provider/Order/ProductFreeOptionsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 		$attribute = \Aimeos\MShop::create( $this->context, 'order/base/product/attribute' )->createItem();
47 47
 
48 48
 		$attribute = $attribute->setQuantity( 2 )->setCode( 'size' )->setType( 'config' )
49
-			->setAttributeId( $attrManager->findItem( 'xs', [], 'product', 'size')->getId() );
49
+			->setAttributeId( $attrManager->findItem( 'xs', [], 'product', 'size' )->getId() );
50 50
 
51 51
 		$product = $product->setAttributeItem( $attribute )->setProductId( $prodManager->findItem( 'CNE' )->getId() );
52 52
 
Please login to merge, or discard this patch.