@@ -98,8 +98,7 @@ |
||
98 | 98 | foreach( $products as $prodItem ) { // calculate bundled products |
99 | 99 | $sum += $qty * $prodItem->getQuantity(); |
100 | 100 | } |
101 | - } |
|
102 | - else |
|
101 | + } else |
|
103 | 102 | { |
104 | 103 | $sum += $qty; |
105 | 104 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | return array( |
10 | 10 | 'table' => array( |
11 | - 'mshop_media_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
11 | + 'mshop_media_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
12 | 12 | |
13 | 13 | $table = $schema->createTable( 'mshop_media_type' ); |
14 | 14 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | return $schema; |
32 | 32 | }, |
33 | 33 | |
34 | - 'mshop_media' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
34 | + 'mshop_media' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
35 | 35 | |
36 | 36 | $table = $schema->createTable( 'mshop_media' ); |
37 | 37 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $table->addColumn( 'status', 'smallint', [] ); |
48 | 48 | $table->addColumn( 'mtime', 'datetime', [] ); |
49 | 49 | $table->addColumn( 'ctime', 'datetime', [] ); |
50 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
50 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
51 | 51 | |
52 | 52 | $table->setPrimaryKey( array( 'id' ), 'pk_msmed_id' ); |
53 | 53 | $table->addIndex( array( 'siteid', 'domain', 'langid' ), 'idx_msmed_sid_dom_langid' ); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return $schema; |
63 | 63 | }, |
64 | 64 | |
65 | - 'mshop_media_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
65 | + 'mshop_media_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
66 | 66 | |
67 | 67 | $table = $schema->createTable( 'mshop_media_list_type' ); |
68 | 68 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | return $schema; |
86 | 86 | }, |
87 | 87 | |
88 | - 'mshop_media_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
88 | + 'mshop_media_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
89 | 89 | |
90 | 90 | $table = $schema->createTable( 'mshop_media_list' ); |
91 | 91 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | return $schema; |
124 | 124 | }, |
125 | 125 | |
126 | - 'mshop_media_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
126 | + 'mshop_media_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
127 | 127 | |
128 | 128 | $table = $schema->createTable( 'mshop_media_property_type' ); |
129 | 129 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | return $schema; |
147 | 147 | }, |
148 | 148 | |
149 | - 'mshop_media_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
149 | + 'mshop_media_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
150 | 150 | |
151 | 151 | $table = $schema->createTable( 'mshop_media_property' ); |
152 | 152 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | 'table' => array( |
12 | 12 | |
13 | - 'mshop_subscription' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
13 | + 'mshop_subscription' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
14 | 14 | |
15 | 15 | $table = $schema->createTable( 'mshop_subscription' ); |
16 | 16 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $table->addColumn( 'status', 'smallint', array( 'default' => 0 ) ); |
24 | 24 | $table->addColumn( 'mtime', 'datetime', [] ); |
25 | 25 | $table->addColumn( 'ctime', 'datetime', [] ); |
26 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
26 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
27 | 27 | |
28 | 28 | $table->setPrimaryKey( array( 'id' ), 'pk_mssub_id' ); |
29 | 29 | $table->addIndex( array( 'siteid', 'next', 'status' ), 'idx_mssub_sid_next_stat' ); |
@@ -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 |
@@ -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: |
@@ -85,9 +85,12 @@ |
||
85 | 85 | throw new \Aimeos\MW\DB\Exception( sprintf( $msg, count( $this->binds ), implode( '?', $this->parts ) ) ); |
86 | 86 | } |
87 | 87 | |
88 | - try { |
|
88 | + try |
|
89 | + { |
|
89 | 90 | $result = $this->exec(); |
90 | - } catch( \PDOException $e ) { |
|
91 | + } |
|
92 | + catch( \PDOException $e ) |
|
93 | + { |
|
91 | 94 | throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() ); |
92 | 95 | } |
93 | 96 |
@@ -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() . ': ' . $this->sql, $e->getCode() ); |
93 | 96 | } |
94 | 97 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | return array( |
10 | 10 | 'table' => array( |
11 | - 'mshop_customer' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
11 | + 'mshop_customer' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
12 | 12 | |
13 | 13 | $table = $schema->createTable( 'mshop_customer' ); |
14 | 14 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $table->addColumn( 'status', 'smallint', [] ); |
43 | 43 | $table->addColumn( 'mtime', 'datetime', [] ); |
44 | 44 | $table->addColumn( 'ctime', 'datetime', [] ); |
45 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
45 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
46 | 46 | |
47 | 47 | $table->setPrimaryKey( array( 'id' ), 'pk_mscus_id' ); |
48 | 48 | $table->addUniqueIndex( array( 'siteid', 'code' ), 'unq_mscus_sid_code' ); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return $schema; |
57 | 57 | }, |
58 | 58 | |
59 | - 'mshop_customer_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
59 | + 'mshop_customer_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
60 | 60 | |
61 | 61 | $table = $schema->createTable( 'mshop_customer_address' ); |
62 | 62 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $table->addColumn( 'pos', 'smallint', [] ); |
88 | 88 | $table->addColumn( 'mtime', 'datetime', [] ); |
89 | 89 | $table->addColumn( 'ctime', 'datetime', [] ); |
90 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
90 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
91 | 91 | |
92 | 92 | $table->setPrimaryKey( array( 'id' ), 'pk_mscusad_id' ); |
93 | 93 | $table->addIndex( array( 'parentid' ), 'fk_mscusad_pid' ); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | return $schema; |
105 | 105 | }, |
106 | 106 | |
107 | - 'mshop_customer_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
107 | + 'mshop_customer_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
108 | 108 | |
109 | 109 | $table = $schema->createTable( 'mshop_customer_list_type' ); |
110 | 110 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | return $schema; |
128 | 128 | }, |
129 | 129 | |
130 | - 'mshop_customer_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
130 | + 'mshop_customer_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
131 | 131 | |
132 | 132 | $table = $schema->createTable( 'mshop_customer_list' ); |
133 | 133 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | return $schema; |
166 | 166 | }, |
167 | 167 | |
168 | - 'mshop_customer_group' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
168 | + 'mshop_customer_group' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
169 | 169 | |
170 | 170 | $table = $schema->createTable( 'mshop_customer_group' ); |
171 | 171 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | return $schema; |
185 | 185 | }, |
186 | 186 | |
187 | - 'mshop_customer_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
187 | + 'mshop_customer_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
188 | 188 | |
189 | 189 | $table = $schema->createTable( 'mshop_customer_property_type' ); |
190 | 190 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | return $schema; |
208 | 208 | }, |
209 | 209 | |
210 | - 'mshop_customer_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
210 | + 'mshop_customer_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
211 | 211 | |
212 | 212 | $table = $schema->createTable( 'mshop_customer_property' ); |
213 | 213 |
@@ -76,8 +76,7 @@ |
||
76 | 76 | $this->release( $conn ); |
77 | 77 | |
78 | 78 | $this->status( 'done' ); |
79 | - } |
|
80 | - else |
|
79 | + } else |
|
81 | 80 | { |
82 | 81 | $this->status( 'OK' ); |
83 | 82 | } |