@@ -83,8 +83,7 @@ |
||
| 83 | 83 | foreach( $items as $localeItem ) { |
| 84 | 84 | $data[] = $entryFcn( $localeItem ); |
| 85 | 85 | } |
| 86 | - } |
|
| 87 | - else |
|
| 86 | + } else |
|
| 88 | 87 | { |
| 89 | 88 | $data = $entryFcn( $items ); |
| 90 | 89 | } |
@@ -91,8 +91,7 @@ |
||
| 91 | 91 | foreach( $items as $addrItem ) { |
| 92 | 92 | $data[] = $entryFcn( $addrItem ); |
| 93 | 93 | } |
| 94 | - } |
|
| 95 | - else |
|
| 94 | + } else |
|
| 96 | 95 | { |
| 97 | 96 | $data = $entryFcn( $items ); |
| 98 | 97 | } |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | foreach( $items as $item ) { |
| 102 | 102 | $data[] = $entryFcn( $item ); |
| 103 | 103 | } |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | { |
| 107 | 106 | $data = $entryFcn( $items ); |
| 108 | 107 | } |
@@ -262,10 +262,13 @@ |
||
| 262 | 262 | "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>", |
| 263 | 263 | "allow": ["POST"] |
| 264 | 264 | } |
| 265 | - <?php else : ?> |
|
| 265 | + <?php else { |
|
| 266 | + : ?> |
|
| 266 | 267 | , |
| 267 | 268 | "order": { |
| 268 | - "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>", |
|
| 269 | + "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); |
|
| 270 | +} |
|
| 271 | +?>", |
|
| 269 | 272 | "allow": ["POST"] |
| 270 | 273 | } |
| 271 | 274 | <?php endif; ?> |
@@ -28,9 +28,12 @@ |
||
| 28 | 28 | |
| 29 | 29 | "errors": <?= json_encode( $this->errors, JSON_PRETTY_PRINT ); ?> |
| 30 | 30 | |
| 31 | - <?php else : ?> |
|
| 31 | + <?php else { |
|
| 32 | + : ?> |
|
| 32 | 33 | |
| 33 | - "data": <?= json_encode( $entries ); ?> |
|
| 34 | + "data": <?= json_encode( $entries ); |
|
| 35 | +} |
|
| 36 | +?> |
|
| 34 | 37 | |
| 35 | 38 | <?php endif; ?> |
| 36 | 39 | } |
@@ -39,13 +39,11 @@ |
||
| 39 | 39 | { |
| 40 | 40 | $response = $this->getItem( $view, $request, $response ); |
| 41 | 41 | $status = 200; |
| 42 | - } |
|
| 43 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 42 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 44 | 43 | { |
| 45 | 44 | $status = 404; |
| 46 | 45 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 47 | - } |
|
| 48 | - catch( \Exception $e ) |
|
| 46 | + } catch( \Exception $e ) |
|
| 49 | 47 | { |
| 50 | 48 | $status = 500; |
| 51 | 49 | $view->errors = $this->getErrorDetails( $e ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -46,13 +46,11 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $status = 200; |
| 49 | - } |
|
| 50 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 51 | 50 | { |
| 52 | 51 | $status = 404; |
| 53 | 52 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 54 | - } |
|
| 55 | - catch( \Exception $e ) |
|
| 53 | + } catch( \Exception $e ) |
|
| 56 | 54 | { |
| 57 | 55 | $status = 500; |
| 58 | 56 | $view->errors = $this->getErrorDetails( $e ); |
@@ -81,8 +79,7 @@ discard block |
||
| 81 | 79 | */ |
| 82 | 80 | $tplconf = 'client/jsonapi/product/standard/template-aggregate'; |
| 83 | 81 | $default = 'aggregate-standard.php'; |
| 84 | - } |
|
| 85 | - else |
|
| 82 | + } else |
|
| 86 | 83 | { |
| 87 | 84 | /** client/jsonapi/product/standard/template |
| 88 | 85 | * Relative path to the product JSON API template |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $view->items = $cntl->getItem( $id ); |
| 45 | 45 | $view->total = 1; |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } else |
|
| 48 | 47 | { |
| 49 | 48 | $total = 0; |
| 50 | 49 | $filter = $cntl->createFilter(); |
@@ -55,18 +54,15 @@ discard block |
||
| 55 | 54 | } |
| 56 | 55 | |
| 57 | 56 | $status = 200; |
| 58 | - } |
|
| 59 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 57 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 60 | 58 | { |
| 61 | 59 | $status = 403; |
| 62 | 60 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 63 | - } |
|
| 64 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 61 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 65 | 62 | { |
| 66 | 63 | $status = 404; |
| 67 | 64 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 68 | - } |
|
| 69 | - catch( \Exception $e ) |
|
| 65 | + } catch( \Exception $e ) |
|
| 70 | 66 | { |
| 71 | 67 | $status = 500; |
| 72 | 68 | $view->errors = $this->getErrorDetails( $e ); |
@@ -107,23 +103,19 @@ discard block |
||
| 107 | 103 | $view->total = 1; |
| 108 | 104 | |
| 109 | 105 | $status = 201; |
| 110 | - } |
|
| 111 | - catch( \Aimeos\Client\JsonApi\Exception $e ) |
|
| 106 | + } catch( \Aimeos\Client\JsonApi\Exception $e ) |
|
| 112 | 107 | { |
| 113 | 108 | $status = $e->getCode(); |
| 114 | 109 | $view->errors = $this->getErrorDetails( $e, 'client/jsonapi' ); |
| 115 | - } |
|
| 116 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 110 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 117 | 111 | { |
| 118 | 112 | $status = 403; |
| 119 | 113 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 120 | - } |
|
| 121 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 114 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 122 | 115 | { |
| 123 | 116 | $status = 404; |
| 124 | 117 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 125 | - } |
|
| 126 | - catch( \Exception $e ) |
|
| 118 | + } catch( \Exception $e ) |
|
| 127 | 119 | { |
| 128 | 120 | $status = 500; |
| 129 | 121 | $view->errors = $this->getErrorDetails( $e ); |