@@ -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 |
@@ -94,8 +94,8 @@ |
||
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 |
@@ -89,7 +89,7 @@ discard block |
||
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 |
||
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 ) { |
@@ -46,7 +46,7 @@ |
||
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 |