@@ -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(), $e->getCode() ); |
65 | 68 | } |
66 | 69 |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | foreach( $attributes as $key => $item ) |
70 | 70 | { |
71 | 71 | if( $item instanceof $iface ) { |
72 | - $list[ $item->getCode() ] = $item->getFunction(); |
|
72 | + $list[$item->getCode()] = $item->getFunction(); |
|
73 | 73 | } else if( isset( $item['code'] ) ) { |
74 | - $list[ $item['code'] ] = $item['function']; |
|
74 | + $list[$item['code']] = $item['function']; |
|
75 | 75 | } else { |
76 | 76 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid attribute at position "%1$d"', $key ) ); |
77 | 77 | } |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | foreach( $attributes as $key => $item ) |
98 | 98 | { |
99 | 99 | if( $item instanceof $iface ) { |
100 | - $translations[ $item->getCode() ] = $item->getInternalCode(); |
|
100 | + $translations[$item->getCode()] = $item->getInternalCode(); |
|
101 | 101 | } else if( isset( $item['code'] ) ) { |
102 | - $translations[ $item['code'] ] = $item['internalcode']; |
|
102 | + $translations[$item['code']] = $item['internalcode']; |
|
103 | 103 | } else { |
104 | 104 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid attribute at position "%1$d"', $key ) ); |
105 | 105 | } |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | foreach( $attributes as $key => $item ) |
126 | 126 | { |
127 | 127 | if( $item instanceof $iface ) { |
128 | - $types[ $item->getCode() ] = $item->getInternalType(); |
|
128 | + $types[$item->getCode()] = $item->getInternalType(); |
|
129 | 129 | } else if( isset( $item['code'] ) ) { |
130 | - $types[ $item['code'] ] = $item['internaltype']; |
|
130 | + $types[$item['code']] = $item['internaltype']; |
|
131 | 131 | } else { |
132 | 132 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid attribute at position "%1$d"', $key ) ); |
133 | 133 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'function' => $func, |
33 | 33 | ); |
34 | 34 | |
35 | - $this->object = new \Aimeos\MW\Criteria\Attribute\Standard($values); |
|
35 | + $this->object = new \Aimeos\MW\Criteria\Attribute\Standard( $values ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public function testGetInternalDeps() |
70 | 70 | { |
71 | - $this->assertEquals(array( 'test' ), $this->object->getInternalDeps()); |
|
71 | + $this->assertEquals( array( 'test' ), $this->object->getInternalDeps() ); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 |
@@ -317,8 +317,7 @@ |
||
317 | 317 | * @see mshop/locale/manager/standard/count/ansi |
318 | 318 | */ |
319 | 319 | $path = 'mshop/locale/manager/standard/insert'; |
320 | - } |
|
321 | - else |
|
320 | + } else |
|
322 | 321 | { |
323 | 322 | /** mshop/locale/manager/standard/update/mysql |
324 | 323 | * Updates an existing locale record in the database |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017-2018 |
6 | 6 | */ |
7 | 7 | |
8 | -return array ( |
|
8 | +return array( |
|
9 | 9 | 'media/property/type' => array( |
10 | 10 | 'media/property/type/size' => array( 'domain' => 'media', 'code' => 'size', 'label' => 'Size', 'status' => 1 ), |
11 | 11 | 'media/property/type/mtime' => array( 'domain' => 'media', 'code' => 'mtime', 'label' => 'Modification time', 'status' => 1 ), |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017-2018 |
6 | 6 | */ |
7 | 7 | |
8 | -return array ( |
|
8 | +return array( |
|
9 | 9 | 'attribute/property/type' => array( |
10 | 10 | 'attribute/property/type/size' => array( 'domain' => 'attribute', 'code' => 'size', 'label' => 'Size', 'position' => 0, 'status' => 1 ), |
11 | 11 | 'attribute/property/type/mtime' => array( 'domain' => 'attribute', 'code' => 'mtime', 'label' => 'Modification time', 'position' => 1, 'status' => 1 ), |
@@ -137,8 +137,7 @@ |
||
137 | 137 | foreach( $cond->getExpressions() as $expr ) { |
138 | 138 | $list = array_merge( $list, $this->getProductCodes( $expr ) ); |
139 | 139 | } |
140 | - } |
|
141 | - elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) |
|
140 | + } elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) |
|
142 | 141 | { |
143 | 142 | if( $cond->getName() === 'stock.productcode' && $cond->getOperator() === '==' ) { |
144 | 143 | $list = array_merge( $list, (array) $cond->getValue() ); |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | foreach( $testdata['subscription'] as $key => $dataset ) |
75 | 75 | { |
76 | - $ordProdItem = $this->getOrderProductItem( $dataset['ordprodid'] ) ; |
|
76 | + $ordProdItem = $this->getOrderProductItem( $dataset['ordprodid'] ); |
|
77 | 77 | |
78 | 78 | $item = $subscriptionManager->createItem(); |
79 | 79 | $item->setOrderBaseId( $ordProdItem->getBaseId() ); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | foreach( $addresses as $id => $addr ) |
76 | 76 | { |
77 | - $addrId = ( count( $addresses ) > 1) ? $item->getCode() . '-' . $id : $item->getCode(); |
|
77 | + $addrId = ( count( $addresses ) > 1 ) ? $item->getCode() . '-' . $id : $item->getCode(); |
|
78 | 78 | |
79 | 79 | $this->feConfig['supplier.code']['default'][$addrId] = preg_replace( "/\n+/m", "\n", sprintf( |
80 | 80 | /// Supplier address format with label (%1$s), company (%2$s), |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | /// address part one (%3$s, e.g street), address part two (%4$s, e.g house number), address part three (%5$s, e.g additional information), |
113 | 113 | /// postal/zip code (%6$s), city (%7$s), state (%8$s), country ID (%9$s), |
114 | 114 | /// e-mail (%10$s), phone (%11$s), facsimile/telefax (%12$s), web site (%13$s) |
115 | - $context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s'), |
|
115 | + $context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s' ), |
|
116 | 116 | $item->getLabel(), |
117 | 117 | $addr->getCompany(), |
118 | 118 | $addr->getAddress1(), |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $attributes['supplier.address'] = $this->feConfig['supplier.code']['short'][$code]; |
193 | 193 | |
194 | 194 | // remove code attribute for summary page / customer email |
195 | - if( $this->getConfigValue('supplier.display-code') == 0 ) { |
|
195 | + if( $this->getConfigValue( 'supplier.display-code' ) == 0 ) { |
|
196 | 196 | unset( $attributes['supplier.code'] ); |
197 | 197 | } |
198 | 198 | } |
@@ -172,7 +172,9 @@ |
||
172 | 172 | $feconfig['supplier.code']['default'] = [$value => $address] + $feconfig['supplier.code']['default']; |
173 | 173 | } |
174 | 174 | } |
175 | - catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available |
|
175 | + catch( \Aimeos\MShop\Service\Exception $e ) |
|
176 | + { |
|
177 | +} // If service isn't available |
|
176 | 178 | |
177 | 179 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
178 | 180 | } |