@@ -91,7 +91,7 @@ |
||
91 | 91 | } |
92 | 92 | |
93 | 93 | foreach( $this->getStockItems( $productCodes, $stockTypes ) as $stockItem ) { |
94 | - $stockMap[ $stockItem->getProductCode() ][ $stockItem->getType() ] = $stockItem; |
|
94 | + $stockMap[$stockItem->getProductCode()][$stockItem->getType()] = $stockItem; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | return $this->checkStockLevels( $order, $stockMap ); |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $lastPos++; |
726 | 726 | } |
727 | 727 | } |
728 | - catch( \Exception $e ) { ; } // If no delivery service is available |
|
728 | + catch( \Exception $e ) {; } // If no delivery service is available |
|
729 | 729 | } |
730 | 730 | |
731 | 731 | |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | */ |
819 | 819 | public function send( $target, $method, $payload ) |
820 | 820 | { |
821 | - if( ( $curl = curl_init() )=== false ) { |
|
821 | + if( ( $curl = curl_init() ) === false ) { |
|
822 | 822 | throw new \Aimeos\MShop\Service\Exception( 'Could not initialize curl' ); |
823 | 823 | } |
824 | 824 | |
@@ -829,16 +829,16 @@ discard block |
||
829 | 829 | curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, strtoupper( $method ) ); |
830 | 830 | curl_setopt( $curl, CURLOPT_POSTFIELDS, $payload ); |
831 | 831 | curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 25 ); |
832 | - curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true ); // return data as string |
|
832 | + curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true ); // return data as string |
|
833 | 833 | |
834 | 834 | curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, true ); |
835 | 835 | |
836 | - if ( ( $response = curl_exec( $curl ) ) === false ) { |
|
836 | + if( ( $response = curl_exec( $curl ) ) === false ) { |
|
837 | 837 | throw new \Aimeos\MShop\Service\Exception( sprintf( 'Sending order failed: "%1$s"', curl_error( $curl ) ) ); |
838 | 838 | } |
839 | 839 | |
840 | - if ( curl_errno($curl) ) { |
|
841 | - throw new \Aimeos\MShop\Service\Exception( sprintf( 'Curl error: "%1$s" - "%2$s"', curl_errno($curl), curl_error($curl) ) ); |
|
840 | + if( curl_errno( $curl ) ) { |
|
841 | + throw new \Aimeos\MShop\Service\Exception( sprintf( 'Curl error: "%1$s" - "%2$s"', curl_errno( $curl ), curl_error( $curl ) ) ); |
|
842 | 842 | } |
843 | 843 | |
844 | 844 | curl_close( $curl ); |
@@ -725,7 +725,9 @@ |
||
725 | 725 | $lastPos++; |
726 | 726 | } |
727 | 727 | } |
728 | - catch( \Exception $e ) { ; } // If no delivery service is available |
|
728 | + catch( \Exception $e ) |
|
729 | + { |
|
730 | +; } // If no delivery service is available |
|
729 | 731 | } |
730 | 732 | |
731 | 733 |
@@ -129,7 +129,9 @@ |
||
129 | 129 | $feconfig['delivery.type']['default'] = $values; |
130 | 130 | } |
131 | 131 | } |
132 | - catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available |
|
132 | + catch( \Aimeos\MShop\Service\Exception $e ) |
|
133 | + { |
|
134 | +} // If service isn't available |
|
133 | 135 | |
134 | 136 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
135 | 137 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | 'table' => array( |
18 | 18 | |
19 | - 'mshop_order_base' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
19 | + 'mshop_order_base' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
20 | 20 | |
21 | 21 | $table = $schema->createTable( 'mshop_order_base' ); |
22 | 22 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $table->addColumn( 'comment', 'text', array( 'length' => 0xfff ) ); |
36 | 36 | $table->addColumn( 'mtime', 'datetime', [] ); |
37 | 37 | $table->addColumn( 'ctime', 'datetime', [] ); |
38 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
38 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
39 | 39 | |
40 | 40 | $table->setPrimaryKey( array( 'id' ), 'pk_msordba_id' ); |
41 | 41 | $table->addIndex( array( 'sitecode', 'customerid' ), 'idx_msordba_scode_custid' ); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $schema; |
46 | 46 | }, |
47 | 47 | |
48 | - 'mshop_order_base_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
48 | + 'mshop_order_base_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
49 | 49 | |
50 | 50 | $table = $schema->createTable( 'mshop_order_base_address' ); |
51 | 51 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $table->addColumn( 'pos', 'integer', [] ); |
78 | 78 | $table->addColumn( 'mtime', 'datetime', [] ); |
79 | 79 | $table->addColumn( 'ctime', 'datetime', [] ); |
80 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
80 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
81 | 81 | |
82 | 82 | $table->setPrimaryKey( array( 'id' ), 'pk_msordbaad_id' ); |
83 | 83 | $table->addUniqueIndex( array( 'baseid', 'type' ), 'unq_msordbaad_bid_type' ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | return $schema; |
96 | 96 | }, |
97 | 97 | |
98 | - 'mshop_order_base_product' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
98 | + 'mshop_order_base_product' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
99 | 99 | |
100 | 100 | $table = $schema->createTable( 'mshop_order_base_product' ); |
101 | 101 | |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | $table->addColumn( 'ordaddrid', 'bigint', array( 'notnull' => false ) ); |
107 | 107 | $table->addColumn( 'type', 'string', array( 'length' => 64 ) ); |
108 | 108 | $table->addColumn( 'prodid', 'string', array( 'length' => 32 ) ); |
109 | - $table->addColumn( 'prodcode', 'string', array( 'length' => 64 ) ); |
|
110 | - $table->addColumn( 'suppliercode', 'string', array( 'length' => 64 ) ); |
|
109 | + $table->addColumn( 'prodcode', 'string', array( 'length' => 64 ) ); |
|
110 | + $table->addColumn( 'suppliercode', 'string', array( 'length' => 64 ) ); |
|
111 | 111 | $table->addColumn( 'stocktype', 'string', array( 'length' => 64 ) ); |
112 | 112 | $table->addColumn( 'name', 'text', array( 'length' => 0xffff ) ); |
113 | 113 | $table->addColumn( 'description', 'text', array( 'length' => 0xffff ) ); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $table->addColumn( 'status', 'smallint', array( 'default' => -1 ) ); |
128 | 128 | $table->addColumn( 'mtime', 'datetime', [] ); |
129 | 129 | $table->addColumn( 'ctime', 'datetime', [] ); |
130 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
130 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
131 | 131 | |
132 | 132 | $table->setPrimaryKey( array( 'id' ), 'pk_msordbapr_id' ); |
133 | 133 | $table->addUniqueIndex( array( 'baseid', 'pos' ), 'unq_msordbapr_bid_pos' ); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | return $schema; |
142 | 142 | }, |
143 | 143 | |
144 | - 'mshop_order_base_product_attr' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
144 | + 'mshop_order_base_product_attr' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
145 | 145 | |
146 | 146 | $table = $schema->createTable( 'mshop_order_base_product_attr' ); |
147 | 147 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $table->addColumn( 'quantity', 'integer', [] ); |
157 | 157 | $table->addColumn( 'mtime', 'datetime', [] ); |
158 | 158 | $table->addColumn( 'ctime', 'datetime', [] ); |
159 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
159 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
160 | 160 | |
161 | 161 | $table->setPrimaryKey( array( 'id' ), 'pk_msordbaprat_id' ); |
162 | 162 | $table->addUniqueIndex( array( 'ordprodid', 'attrid', 'type', 'code' ), 'unq_msordbaprat_oid_aid_ty_cd' ); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | return $schema; |
169 | 169 | }, |
170 | 170 | |
171 | - 'mshop_order_base_service' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
171 | + 'mshop_order_base_service' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
172 | 172 | |
173 | 173 | $table = $schema->createTable( 'mshop_order_base_service' ); |
174 | 174 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $table->addColumn( 'pos', 'integer', [] ); |
191 | 191 | $table->addColumn( 'mtime', 'datetime', [] ); |
192 | 192 | $table->addColumn( 'ctime', 'datetime', [] ); |
193 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
193 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
194 | 194 | |
195 | 195 | $table->setPrimaryKey( array( 'id' ), 'pk_msordbase_id' ); |
196 | 196 | $table->addUniqueIndex( array( 'siteid', 'baseid', 'code', 'type' ), 'unq_msordbase_sid_bid_cd_typ' ); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | return $schema; |
204 | 204 | }, |
205 | 205 | |
206 | - 'mshop_order_base_service_attr' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
206 | + 'mshop_order_base_service_attr' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
207 | 207 | |
208 | 208 | $table = $schema->createTable( 'mshop_order_base_service_attr' ); |
209 | 209 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $table->addColumn( 'quantity', 'integer', [] ); |
219 | 219 | $table->addColumn( 'mtime', 'datetime', [] ); |
220 | 220 | $table->addColumn( 'ctime', 'datetime', [] ); |
221 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
221 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
222 | 222 | |
223 | 223 | $table->setPrimaryKey( array( 'id' ), 'pk_msordbaseat_id' ); |
224 | 224 | $table->addUniqueIndex( array( 'ordservid', 'attrid', 'type', 'code' ), 'unq_msordbaseat_oid_aid_ty_cd' ); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | return $schema; |
231 | 231 | }, |
232 | 232 | |
233 | - 'mshop_order_base_coupon' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
233 | + 'mshop_order_base_coupon' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
234 | 234 | |
235 | 235 | $table = $schema->createTable( 'mshop_order_base_coupon' ); |
236 | 236 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $table->addColumn( 'code', 'string', array( 'length' => 64 ) ); |
242 | 242 | $table->addColumn( 'mtime', 'datetime', [] ); |
243 | 243 | $table->addColumn( 'ctime', 'datetime', [] ); |
244 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
244 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
245 | 245 | |
246 | 246 | $table->setPrimaryKey( array( 'id' ), 'pk_msordbaco_id' ); |
247 | 247 | $table->addIndex( array( 'siteid', 'baseid', 'code' ), 'idx_msordbaco_sid_bid_code' ); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | return $schema; |
258 | 258 | }, |
259 | 259 | |
260 | - 'mshop_order' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
260 | + 'mshop_order' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
261 | 261 | |
262 | 262 | $table = $schema->createTable( 'mshop_order' ); |
263 | 263 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $table->addColumn( 'chour', 'string', array( 'length' => 2 ) ); |
278 | 278 | $table->addColumn( 'ctime', 'datetime', [] ); |
279 | 279 | $table->addColumn( 'mtime', 'datetime', [] ); |
280 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
280 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
281 | 281 | |
282 | 282 | $table->setPrimaryKey( array( 'id' ), 'pk_msord_id' ); |
283 | 283 | $table->addIndex( array( 'siteid', 'type' ), 'idx_msord_sid_type' ); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | return $schema; |
302 | 302 | }, |
303 | 303 | |
304 | - 'mshop_order_status' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
304 | + 'mshop_order_status' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
305 | 305 | |
306 | 306 | $table = $schema->createTable( 'mshop_order_status' ); |
307 | 307 | |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | $table->addColumn( 'value', 'string', array( 'length' => 64 ) ); |
313 | 313 | $table->addColumn( 'mtime', 'datetime', [] ); |
314 | 314 | $table->addColumn( 'ctime', 'datetime', [] ); |
315 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
315 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
316 | 316 | |
317 | 317 | $table->setPrimaryKey( array( 'id' ), 'pk_msordst_id' ); |
318 | 318 | $table->addIndex( array( 'siteid', 'parentid', 'type', 'value' ), 'idx_msordstatus_val_sid' ); |
@@ -29,8 +29,8 @@ |
||
29 | 29 | |
30 | 30 | protected function setUp() |
31 | 31 | { |
32 | - $this->propItem = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.type' => 'test', 'c.value' => 'value']); |
|
33 | - $this->propItem2 = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.languageid' => 'en', 'c.type' => 'test2']); |
|
32 | + $this->propItem = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.type' => 'test', 'c.value' => 'value'] ); |
|
33 | + $this->propItem2 = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['.languageid' => 'de', 'c.languageid' => 'en', 'c.type' => 'test2'] ); |
|
34 | 34 | |
35 | 35 | $this->object = new TraitsClass(); |
36 | 36 | $this->object->addPropertyItem( $this->propItem ); |
@@ -59,9 +59,12 @@ |
||
59 | 59 | */ |
60 | 60 | public function execute() |
61 | 61 | { |
62 | - try { |
|
62 | + try |
|
63 | + { |
|
63 | 64 | $stmt = $this->exec(); |
64 | - } catch( \PDOException $e ) { |
|
65 | + } |
|
66 | + catch( \PDOException $e ) |
|
67 | + { |
|
65 | 68 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode(), $e->errorInfo ); |
66 | 69 | } |
67 | 70 |
@@ -58,9 +58,12 @@ |
||
58 | 58 | */ |
59 | 59 | public function execute() |
60 | 60 | { |
61 | - try { |
|
61 | + try |
|
62 | + { |
|
62 | 63 | $stmt = $this->exec(); |
63 | - } catch( \PDOException $e ) { |
|
64 | + } |
|
65 | + catch( \PDOException $e ) |
|
66 | + { |
|
64 | 67 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() ); |
65 | 68 | } |
66 | 69 |
@@ -69,8 +69,7 @@ |
||
69 | 69 | $dbm->release( $conn, $rname ); |
70 | 70 | |
71 | 71 | $this->status( 'done' ); |
72 | - } |
|
73 | - else |
|
72 | + } else |
|
74 | 73 | { |
75 | 74 | $this->status( 'OK' ); |
76 | 75 | } |
@@ -80,8 +80,7 @@ |
||
80 | 80 | $dbm->release( $conn, $rname ); |
81 | 81 | |
82 | 82 | $this->status( 'done' ); |
83 | - } |
|
84 | - else |
|
83 | + } else |
|
85 | 84 | { |
86 | 85 | $this->status( 'OK' ); |
87 | 86 | } |