@@ -108,9 +108,12 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function createItem( array $values = [] ) |
110 | 110 | { |
111 | - try { |
|
111 | + try |
|
112 | + { |
|
112 | 113 | $values['locale.currency.siteid'] = $this->getContext()->getLocale()->getSiteId(); |
113 | - } catch( \Exception $e ) { |
|
114 | + } |
|
115 | + catch( \Exception $e ) |
|
116 | + { |
|
114 | 117 | $values['locale.currency.siteid'] = null; |
115 | 118 | } |
116 | 119 | |
@@ -180,8 +183,7 @@ discard block |
||
180 | 183 | * @see mshop/locale/manager/currency/standard/count/ansi |
181 | 184 | */ |
182 | 185 | $path = 'mshop/locale/manager/currency/standard/insert'; |
183 | - } |
|
184 | - else |
|
186 | + } else |
|
185 | 187 | { |
186 | 188 | /** mshop/locale/manager/currency/standard/update/mysql |
187 | 189 | * Updates an existing currency record in the database |
@@ -108,9 +108,12 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function createItem( array $values = [] ) |
110 | 110 | { |
111 | - try { |
|
111 | + try |
|
112 | + { |
|
112 | 113 | $values['locale.language.siteid'] = $this->getContext()->getLocale()->getSiteId(); |
113 | - } catch( \Exception $ex ) { |
|
114 | + } |
|
115 | + catch( \Exception $ex ) |
|
116 | + { |
|
114 | 117 | $values['locale.language.siteid'] = null; |
115 | 118 | } |
116 | 119 | |
@@ -177,8 +180,7 @@ discard block |
||
177 | 180 | * @see mshop/locale/manager/language/standard/count/ansi |
178 | 181 | */ |
179 | 182 | $path = 'mshop/locale/manager/language/standard/insert'; |
180 | - } |
|
181 | - else |
|
183 | + } else |
|
182 | 184 | { |
183 | 185 | /** mshop/locale/manager/language/standard/update/mysql |
184 | 186 | * Updates an existing language record in the database |
@@ -155,9 +155,12 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function createItem( array $values = [] ) |
157 | 157 | { |
158 | - try { |
|
158 | + try |
|
159 | + { |
|
159 | 160 | $values['log.siteid'] = $this->getContext()->getLocale()->getSiteId(); |
160 | - } catch( \Exception $e ) { |
|
161 | + } |
|
162 | + catch( \Exception $e ) |
|
163 | + { |
|
161 | 164 | $values['log.siteid'] = null; |
162 | 165 | } |
163 | 166 | |
@@ -182,9 +185,12 @@ discard block |
||
182 | 185 | |
183 | 186 | $context = $this->getContext(); |
184 | 187 | |
185 | - try { |
|
188 | + try |
|
189 | + { |
|
186 | 190 | $siteid = $context->getLocale()->getSiteId(); |
187 | - } catch( \Exception $e ) { |
|
191 | + } |
|
192 | + catch( \Exception $e ) |
|
193 | + { |
|
188 | 194 | $siteid = null; |
189 | 195 | } |
190 | 196 | |
@@ -234,8 +240,7 @@ discard block |
||
234 | 240 | * @see madmin/log/manager/standard/count/ansi |
235 | 241 | */ |
236 | 242 | $path = 'madmin/log/manager/standard/insert'; |
237 | - } |
|
238 | - else |
|
243 | + } else |
|
239 | 244 | { |
240 | 245 | /** madmin/log/manager/standard/update/mysql |
241 | 246 | * Updates an existing log record in the database |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public static function checkClass( $name, $object ) |
32 | 32 | { |
33 | - if( ($object instanceof $name) === false ) { |
|
33 | + if( ( $object instanceof $name ) === false ) { |
|
34 | 34 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Object doesn\'t implement "%1$s"', $name ) ); |
35 | 35 | } |
36 | 36 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | foreach( $list as $object ) |
52 | 52 | { |
53 | - if( ($object instanceof $name) === false ) { |
|
53 | + if( ( $object instanceof $name ) === false ) { |
|
54 | 54 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Object doesn\'t implement "%1$s"', $name ) ); |
55 | 55 | } |
56 | 56 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | throw new \Aimeos\MW\Cache\Exception( sprintf( 'Class "%1$s" not available', $classname ) ); |
45 | 45 | } |
46 | 46 | |
47 | - $object = new $classname( $config, $resource ); |
|
47 | + $object = new $classname( $config, $resource ); |
|
48 | 48 | |
49 | 49 | if( !( $object instanceof $iface ) ) { |
50 | 50 | throw new \Aimeos\MW\Cache\Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $iface ) ); |
@@ -217,9 +217,12 @@ discard block |
||
217 | 217 | ); |
218 | 218 | $dbm = $context->getDatabaseManager(); |
219 | 219 | |
220 | - try { |
|
220 | + try |
|
221 | + { |
|
221 | 222 | $this->object = \Aimeos\MW\Cache\Factory::create( $name, $config, $dbm ); |
222 | - } catch( \Exception $e ) { |
|
223 | + } |
|
224 | + catch( \Exception $e ) |
|
225 | + { |
|
223 | 226 | $this->object = \Aimeos\MW\Cache\Factory::create( 'DB', $config, $dbm ); |
224 | 227 | } |
225 | 228 | } |
@@ -288,9 +291,12 @@ discard block |
||
288 | 291 | */ |
289 | 292 | public function createItem( array $values = [] ) |
290 | 293 | { |
291 | - try { |
|
294 | + try |
|
295 | + { |
|
292 | 296 | $values['siteid'] = $this->getContext()->getLocale()->getSiteId(); |
293 | - } catch( \Exception $e ) { |
|
297 | + } |
|
298 | + catch( \Exception $e ) |
|
299 | + { |
|
294 | 300 | $values['siteid'] = null; |
295 | 301 | } |
296 | 302 |
@@ -404,7 +404,7 @@ |
||
404 | 404 | * Removes multiple items specified by ids in the array. |
405 | 405 | * |
406 | 406 | * @param string[] $ids List of IDs |
407 | - * @return \Aimeos\MAdmin\Cache\Manager\Iface Manager object for chaining method calls |
|
407 | + * @return \Aimeos\MAdmin\Cache\Manager\Iface Manager object for chaining method calls |
|
408 | 408 | */ |
409 | 409 | public function deleteItems( array $ids ) |
410 | 410 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $localeManager = \Aimeos\MShop\Locale\Manager\Factory::create( $this->additional, 'Standard' ); |
52 | 52 | |
53 | 53 | |
54 | - $filename = __DIR__ . $ds . 'default'. $ds . 'data'. $ds . 'language.php'; |
|
54 | + $filename = __DIR__ . $ds . 'default' . $ds . 'data' . $ds . 'language.php'; |
|
55 | 55 | |
56 | 56 | if( ( $data = include( $filename ) ) == false ) { |
57 | 57 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) ); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | |
65 | - $filename = __DIR__ . $ds . 'default'. $ds . 'data'. $ds . 'currency.php'; |
|
65 | + $filename = __DIR__ . $ds . 'default' . $ds . 'data' . $ds . 'currency.php'; |
|
66 | 66 | |
67 | 67 | if( ( $data = include( $filename ) ) == false ) { |
68 | 68 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) ); |
@@ -21,8 +21,8 @@ |
||
21 | 21 | |
22 | 22 | $servManager = \Aimeos\MShop\Service\Manager\Factory::create( $this->context ); |
23 | 23 | $search = $servManager->createSearch(); |
24 | - $search->setConditions($search->compare('==', 'service.provider', 'Standard')); |
|
25 | - $result = $servManager->searchItems($search, array('price')); |
|
24 | + $search->setConditions( $search->compare( '==', 'service.provider', 'Standard' ) ); |
|
25 | + $result = $servManager->searchItems( $search, array( 'price' ) ); |
|
26 | 26 | |
27 | 27 | if( ( $item = reset( $result ) ) === false ) { |
28 | 28 | throw new \RuntimeException( 'No order base item found' ); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::create( $this->context )->createItem(); |
25 | 25 | |
26 | 26 | $provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'abcd' ); |
27 | - $this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Category( $provider, $this->context, $this->couponItem, 'abcd'); |
|
27 | + $this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Category( $provider, $this->context, $this->couponItem, 'abcd' ); |
|
28 | 28 | $this->object->setObject( $this->object ); |
29 | 29 | |
30 | 30 | $priceManager = \Aimeos\MShop::create( $this->context, 'price' ); |