@@ -276,8 +276,7 @@ |
||
276 | 276 | * @see mshop/subscription/manager/standard/count/ansi |
277 | 277 | */ |
278 | 278 | $path = 'mshop/subscription/manager/standard/insert'; |
279 | - } |
|
280 | - else |
|
279 | + } else |
|
281 | 280 | { |
282 | 281 | /** mshop/subscription/manager/standard/update/mysql |
283 | 282 | * Updates an existing subscription record in the database |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | foreach( $this->getStockItems( $productCodes, $stockTypes ) as $stockItem ) { |
96 | - $stockMap[ $stockItem->getProductCode() ][ $stockItem->getType() ] = $stockItem->getStocklevel(); |
|
96 | + $stockMap[$stockItem->getProductCode()][$stockItem->getType()] = $stockItem->getStocklevel(); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | return $this->checkStockLevels( $order, $stockMap ); |
@@ -118,16 +118,16 @@ discard block |
||
118 | 118 | { |
119 | 119 | $stocklevel = 0; |
120 | 120 | |
121 | - if( isset( $stockMap[ $orderProductItem->getProductCode() ] ) |
|
122 | - && array_key_exists( $orderProductItem->getStockType(), $stockMap[ $orderProductItem->getProductCode() ] ) |
|
121 | + if( isset( $stockMap[$orderProductItem->getProductCode()] ) |
|
122 | + && array_key_exists( $orderProductItem->getStockType(), $stockMap[$orderProductItem->getProductCode()] ) |
|
123 | 123 | ) { |
124 | - if( ( $stocklevel = $stockMap[ $orderProductItem->getProductCode() ][ $orderProductItem->getStockType() ] ) === null ) { |
|
124 | + if( ( $stocklevel = $stockMap[$orderProductItem->getProductCode()][$orderProductItem->getStockType()] ) === null ) { |
|
125 | 125 | continue; |
126 | 126 | } |
127 | 127 | |
128 | 128 | if( $stocklevel >= $orderProductItem->getQuantity() ) |
129 | 129 | { |
130 | - $stockMap[ $orderProductItem->getProductCode() ][ $orderProductItem->getStockType() ] -= $orderProductItem->getQuantity(); |
|
130 | + $stockMap[$orderProductItem->getProductCode()][$orderProductItem->getStockType()] -= $orderProductItem->getQuantity(); |
|
131 | 131 | continue; |
132 | 132 | } |
133 | 133 | } |
@@ -118,10 +118,11 @@ |
||
118 | 118 | ) { |
119 | 119 | return false; |
120 | 120 | } |
121 | - } |
|
122 | - else if( isset( $addresses[$paymentType] ) ) // use billing address if no delivery address is available |
|
121 | + } else if( isset( $addresses[$paymentType] ) ) { |
|
122 | + // use billing address if no delivery address is available |
|
123 | 123 | { |
124 | 124 | $code = $addresses[$paymentType]->getPostal(); |
125 | + } |
|
125 | 126 | |
126 | 127 | if( $this->checkPostalCode( $code, 'postal.delivery-include' ) === false |
127 | 128 | || $this->checkPostalCode( $code, 'postal.delivery-exclude' ) === true |
@@ -97,7 +97,9 @@ |
||
97 | 97 | $feconfig['date.value']['default'] = $value; |
98 | 98 | } |
99 | 99 | } |
100 | - catch( \Aimeos\MShop\Order\Exception $e ) {} // If service isn't available |
|
100 | + catch( \Aimeos\MShop\Order\Exception $e ) |
|
101 | + { |
|
102 | +} // If service isn't available |
|
101 | 103 | |
102 | 104 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
103 | 105 | } |
@@ -16,7 +16,8 @@ discard block |
||
16 | 16 | |
17 | 17 | 'table' => array( |
18 | 18 | |
19 | - 'mshop_index_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
19 | + 'mshop_index_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
20 | + { |
|
20 | 21 | |
21 | 22 | $table = $schema->createTable( 'mshop_index_attribute' ); |
22 | 23 | |
@@ -37,7 +38,8 @@ discard block |
||
37 | 38 | return $schema; |
38 | 39 | }, |
39 | 40 | |
40 | - 'mshop_index_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
41 | + 'mshop_index_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
42 | + { |
|
41 | 43 | |
42 | 44 | $table = $schema->createTable( 'mshop_index_catalog' ); |
43 | 45 | |
@@ -56,7 +58,8 @@ discard block |
||
56 | 58 | return $schema; |
57 | 59 | }, |
58 | 60 | |
59 | - 'mshop_index_price' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
61 | + 'mshop_index_price' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
62 | + { |
|
60 | 63 | |
61 | 64 | $table = $schema->createTable( 'mshop_index_price' ); |
62 | 65 | |
@@ -82,7 +85,8 @@ discard block |
||
82 | 85 | return $schema; |
83 | 86 | }, |
84 | 87 | |
85 | - 'mshop_index_supplier' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
88 | + 'mshop_index_supplier' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
89 | + { |
|
86 | 90 | |
87 | 91 | $table = $schema->createTable( 'mshop_index_supplier' ); |
88 | 92 | |
@@ -101,7 +105,8 @@ discard block |
||
101 | 105 | return $schema; |
102 | 106 | }, |
103 | 107 | |
104 | - 'mshop_index_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
108 | + 'mshop_index_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
109 | + { |
|
105 | 110 | |
106 | 111 | $table = $schema->createTable( 'mshop_index_text' ); |
107 | 112 | $table->addOption( 'engine', 'MyISAM' ); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | 'table' => array( |
18 | 18 | |
19 | - 'mshop_index_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
19 | + 'mshop_index_attribute' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
20 | 20 | |
21 | 21 | $table = $schema->createTable( 'mshop_index_attribute' ); |
22 | 22 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | return $schema; |
36 | 36 | }, |
37 | 37 | |
38 | - 'mshop_index_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
38 | + 'mshop_index_catalog' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
39 | 39 | |
40 | 40 | $table = $schema->createTable( 'mshop_index_catalog' ); |
41 | 41 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return $schema; |
53 | 53 | }, |
54 | 54 | |
55 | - 'mshop_index_price' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
55 | + 'mshop_index_price' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
56 | 56 | |
57 | 57 | $table = $schema->createTable( 'mshop_index_price' ); |
58 | 58 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | return $schema; |
77 | 77 | }, |
78 | 78 | |
79 | - 'mshop_index_supplier' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
79 | + 'mshop_index_supplier' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
80 | 80 | |
81 | 81 | $table = $schema->createTable( 'mshop_index_supplier' ); |
82 | 82 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | return $schema; |
94 | 94 | }, |
95 | 95 | |
96 | - 'mshop_index_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
96 | + 'mshop_index_text' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
97 | 97 | |
98 | 98 | $table = $schema->createTable( 'mshop_index_text' ); |
99 | 99 | $table->addOption( 'engine', 'MyISAM' ); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $table->addColumn( 'listtype', 'string', array( 'length' => 32 ) ); |
105 | 105 | $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
106 | 106 | $table->addColumn( 'type', 'string', array( 'length' => 32 ) ); |
107 | - $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
107 | + $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
108 | 108 | $table->addColumn( 'value', 'text', array( 'length' => 0xffff ) ); |
109 | 109 | $table->addColumn( 'mtime', 'datetime', [] ); |
110 | 110 |
@@ -74,8 +74,7 @@ |
||
74 | 74 | $this->saveItems( $data ); |
75 | 75 | |
76 | 76 | $this->status( 'added' ); |
77 | - } |
|
78 | - else |
|
77 | + } else |
|
79 | 78 | { |
80 | 79 | $this->status( 'removed' ); |
81 | 80 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | case \Aimeos\MW\DB\Statement\Base::PARAM_NULL: |
57 | 57 | $this->binds[$position] = 'NULL'; break; |
58 | 58 | case \Aimeos\MW\DB\Statement\Base::PARAM_BOOL: |
59 | - $this->binds[$position] = ((bool) $value ? 'TRUE' : 'FALSE'); break; |
|
59 | + $this->binds[$position] = ( (bool) $value ? 'TRUE' : 'FALSE' ); break; |
|
60 | 60 | case \Aimeos\MW\DB\Statement\Base::PARAM_INT: |
61 | 61 | $this->binds[$position] = (int) $value; break; |
62 | 62 | case \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT: |
@@ -86,9 +86,12 @@ |
||
86 | 86 | throw new \Aimeos\MW\DB\Exception( sprintf( $msg, count( $this->binds ), implode( '?', $this->parts ) ) ); |
87 | 87 | } |
88 | 88 | |
89 | - try { |
|
89 | + try |
|
90 | + { |
|
90 | 91 | $result = $this->exec(); |
91 | - } catch( \PDOException $e ) { |
|
92 | + } |
|
93 | + catch( \PDOException $e ) |
|
94 | + { |
|
92 | 95 | throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() ); |
93 | 96 | } |
94 | 97 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | case \Aimeos\MW\DB\Statement\Base::PARAM_NULL: |
57 | 57 | $this->binds[$position] = 'NULL'; break; |
58 | 58 | case \Aimeos\MW\DB\Statement\Base::PARAM_BOOL: |
59 | - $this->binds[$position] = ((bool) $value ? 'TRUE' : 'FALSE'); break; |
|
59 | + $this->binds[$position] = ( (bool) $value ? 'TRUE' : 'FALSE' ); break; |
|
60 | 60 | case \Aimeos\MW\DB\Statement\Base::PARAM_INT: |
61 | 61 | $this->binds[$position] = (int) $value; break; |
62 | 62 | case \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT: |
@@ -86,9 +86,12 @@ |
||
86 | 86 | throw new \Aimeos\MW\DB\Exception( sprintf( $msg, count( $this->binds ), implode( '?', $this->parts ) ) ); |
87 | 87 | } |
88 | 88 | |
89 | - try { |
|
89 | + try |
|
90 | + { |
|
90 | 91 | $result = $this->exec(); |
91 | - } catch( \PDOException $e ) { |
|
92 | + } |
|
93 | + catch( \PDOException $e ) |
|
94 | + { |
|
92 | 95 | throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() ); |
93 | 96 | } |
94 | 97 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2018 |
6 | 6 | */ |
7 | 7 | |
8 | -return array ( |
|
8 | +return array( |
|
9 | 9 | 'customer/property/type' => array( |
10 | 10 | 'customer/property/type/newsletter' => array( 'domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1 ), |
11 | 11 | ), |