@@ -110,8 +110,7 @@ |
||
110 | 110 | \Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $orderProduct ); |
111 | 111 | $list[] = $orderProduct->getProductId(); |
112 | 112 | } |
113 | - } |
|
114 | - else |
|
113 | + } else |
|
115 | 114 | { |
116 | 115 | \Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $value ); |
117 | 116 | $list[] = $value->getProductId(); |
@@ -190,7 +190,7 @@ |
||
190 | 190 | * Removes old entries from the storage. |
191 | 191 | * |
192 | 192 | * @param string[] $siteids List of IDs for sites whose entries should be deleted |
193 | - * @return \Aimeos\MShop\Index\Manager\Iface Manager object for chaining method calls |
|
193 | + * @return \Aimeos\MShop\Index\Manager\Iface Manager object for chaining method calls |
|
194 | 194 | */ |
195 | 195 | public function cleanup( array $siteids ) |
196 | 196 | { |
@@ -208,7 +208,7 @@ |
||
208 | 208 | { |
209 | 209 | $refItem = $item->getRefItem(); |
210 | 210 | |
211 | - if( $type && ( !$refItem || !($refItem instanceof $iface) || !in_array( $refItem->getType(), $types ) ) ) { |
|
211 | + if( $type && ( !$refItem || !( $refItem instanceof $iface ) || !in_array( $refItem->getType(), $types ) ) ) { |
|
212 | 212 | continue; |
213 | 213 | } |
214 | 214 |
@@ -124,8 +124,7 @@ |
||
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 ); |
@@ -173,7 +173,7 @@ |
||
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 ); |
@@ -81,8 +81,7 @@ discard block |
||
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 |
||
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 ); |
@@ -434,7 +434,7 @@ discard block |
||
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 |
||
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 |
||
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 ) ) { |
@@ -133,8 +133,7 @@ |
||
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 |
@@ -154,7 +154,7 @@ |
||
154 | 154 | $this->modified = true; |
155 | 155 | } |
156 | 156 | |
157 | - return $this;; |
|
157 | + return $this; ; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 |
@@ -96,9 +96,11 @@ |
||
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 | } |
@@ -104,7 +104,7 @@ discard block |
||
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 |
||
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 |
||
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 |